Created
March 28, 2023 22:36
-
-
Save danielpodrazka/c37be6a4380395362306734db0a3d1cd to your computer and use it in GitHub Desktop.
Bash one-liner that reads content of the files in current directory with their respective filename on top of each file and saves them in clipboard. Skips directories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo apt-get install xclip | |
for file in *; do if [ -f "$file" ]; then echo "=============$file============="; cat "$file"; echo; fi; done | xclip -selection clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generated with GPT4.
Prompt: