Created
December 6, 2020 19:05
-
-
Save gbarreiro/709230939b009bab28456b3b4fd0908d to your computer and use it in GitHub Desktop.
Bash cheatsheet: clipboard
This file contains hidden or 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
# Linux | |
echo "Hello my friend!" | xclip # copy "Hello my friend!" to the clipboard | |
xclip -o >> pasted_text.txt # paste the content of the clipboard into a text file | |
# macOS | |
echo "Hello my friend!" | pbcopy # copy "Hello my friend!" to the clipboard | |
pbpaste >> pasted_text.txt # paste the content of the clipboard into a text file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment