Add OS X-only commands: pbcopy / pbpaste
This commit is contained in:
13
osx/pbcopy.md
Normal file
13
osx/pbcopy.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# pbcopy
|
||||||
|
|
||||||
|
> Place standard output in the clipboard
|
||||||
|
> (OS X only)
|
||||||
|
|
||||||
|
- Place the contents of a file in the clipboard.
|
||||||
|
|
||||||
|
`pbcopy < {{file}}`
|
||||||
|
|
||||||
|
- Place the results of a command in the clipboard
|
||||||
|
|
||||||
|
`find . -type t -name "*.png" | pbcopy`
|
||||||
|
|
13
osx/pbpaste.md
Normal file
13
osx/pbpaste.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# pbpaste
|
||||||
|
|
||||||
|
> Send the contents of the clipboard to standard output
|
||||||
|
> (OS X only)
|
||||||
|
|
||||||
|
- Write the contents of the clipboard to a file.
|
||||||
|
|
||||||
|
`pbpaste > {{file}}`
|
||||||
|
|
||||||
|
- Use the contents of the clipboard as input to a command.
|
||||||
|
|
||||||
|
`pbpaste | grep foo`
|
||||||
|
|
Reference in New Issue
Block a user