Copy From Terminal
Copy the output of something to the clipboard with
pbcopy using the “pipe” character |:
$ pwd | pbcopy
You now have the “working directory” of that terminal in the clipboard.
Cmd + V that sucker into another window and you’ll see something like:
Paste To Terminal
Guess which command will paste to the terminal???
You guessed it: pbpaste.
If you still have your working directory in the clipboard, when you run
pbpaste you should see:
Ain’t that fun?