mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-12-05 08:30:50 +08:00
.. | ||
pbcopy.fish | ||
README.md |
pbcopy
OSX's pbcopy and pbpaste for Linux
pbcopy paste data from the clipboard to STDOUT.
pbpaste paste data from the clipboard.
Usage
Copy a list of files in your home directory to the OS X clipboard:
$ ls ~ | pbcopy
Copy the contents of a file to the clipboard:
$ pbcopy < cookies.txt
Copy part of a file to the clipboard
$ grep 'ip address' serverlist.txt | pbcopy
Paste from your clipboard to stdout
echo pbpaste
$ pbpaste
Paste from your clipboard to a file
$ pbpaste > clipboard.txt
Paste from your clipboard to a file in a remote host
$ pbpaste | ssh username@host 'cat > ~/myclipboard.txt'