terminal output to clipboard
pbcopy, pbpaste - provide copying and pasting to the pasteboard (the
Clipboard) from command line
OSX has a neat command line app, pbcopy that takes any input and sticks it into the clipboard. Handy if you want to take some terminal output and work with it in a windowed application.
To use, simply pipe your output into pbcopy:
ls -l | pbcopy
The output of your ls command is now on the clipboard for you to paste wherever needed.
Written by Allan Kent
Related protips
1 Response
In Linux, it's called xclip
. And pbcopy
doesn't work through tmux unless you
brew install reattach-to-user-namespace
and add
set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash
to your ~/.tmux.conf
.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#