OSTechNix · @ostechnix
663 followers · 1714 posts · Server floss.social

I regularily use and shell commands on . 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

#pbcopy #pbpaste #macos

Last updated 3 years ago

earchibald · @lilith
52 followers · 298 posts · Server sackheads.social

macOS CLI Protip:

The 'pbcopy' command is *tremendously* useful. It sticks whatever is directed in via stdin into the Copy/Paste buffer!

`pbcopy < somescript.sh`

its twin 'pbpaste' comes in handy less often, but is good to keep around.

#mac #macos #cli #macoscli #pbcopy

Last updated 3 years ago