Skip to content

Instantly share code, notes, and snippets.

@otzoran
Created January 12, 2016 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otzoran/5e076a20c9b61f30ab4a to your computer and use it in GitHub Desktop.
Save otzoran/5e076a20c9b61f30ab4a to your computer and use it in GitHub Desktop.
pbcopy/paste on Linux
# pbcopy (on Mac OS), copies stdin to the X clipboard, the aliases created here simulate that.
# need the 'xsel' package
if [[ $(uname -s) == "Linux" && -x /usr/bin/xsel ]]; then
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment