How To Use Pbcopy And Pbpaste Commands On Linux #pbcopy #pbpaste #macos #xclip #xsel #linux #linuxcommands #linuxhowto #linuxtips
https://ostechnix.com/how-to-use-pbcopy-and-pbpaste-commands-on-linux/
#pbcopy #pbpaste #macOS #xclip #xsel #Linux #linuxcommands #linuxhowto #linuxtips
I regularily use #pbcopy and #pbpaste shell commands on #MacOS. They are great to quickly process text. E.g. this formats JSON in clipboard and puts it back to clipboard:
$ pbpaste | jq | pbcopy
or this find the number of unique lines containing the word foo in file.txt:
$ grep foo file.txt | sort | uniq -c | pbcopy