Clipboard-Driven Workflows
What if you could run a complex command by just pasting something? The clipboard can do the heavy lifting for you. In this module, you'll learn to build workflows where Terminal pulls directly from your clipboard, saving command output to files, and creating one-line commands you can run repeatedly without editing.
Terminal Meets Your Clipboard
Your Mac's clipboard — what you copy and paste with Cmd + C and Cmd + V — can talk to Terminal.
This opens up powerful workflows where you can copy from anywhere and use it in Terminal, or copy Terminal output to use anywhere.
Two Commands
Copy to Clipboard
Takes input and puts it on your clipboard.
Paste from Clipboard
Outputs whatever's on your clipboard.
Try It
Copy your current folder path to clipboard:
pwd | pbcopy
Now paste it anywhere — TextEdit, an email, a message
Key Takeaway
pbcopy copies to clipboard, pbpaste pastes from clipboard. The pipe symbol (|) sends output from one command to another.