I just discovered a couple useful command-line tools on OSX and thought I’d share. pbcopy will copy
stdin to the clipboard and pbpaste will send the clipboard to
$ cat somefile.txt | pbcopy #copy a file to the clipboard $ pbpaste | grep foo #search the clipboard for foo
3 replies on “Copy to clipboard from command line”
Nice article, i love it, thanks for sharing
grep foo < pbpaste doesn't do what you think it does.
Thanks Marcelo, I fixed the example.