xsel: Add page (#882)

waldyrious/alt-syntax
Severen Redwood 2016-06-21 10:36:03 +12:00 committed by Waldir Pimenta
parent b4dea673c7
commit fac92c4aa1
1 changed files with 36 additions and 0 deletions

36
pages/linux/xsel.md Normal file
View File

@ -0,0 +1,36 @@
# xsel
> Selection manipulation tool.
> For example, xsel can copy STDIN to clipboard, or print clipboard to STDOUT.
- Clipboard selection:
`-b or --clipboard`
- Primary selection:
`-p or --primary`
- Secndary selection:
`-s or --secondary`
- Copy output of a command into the clipboard:
`echo 123 | xclip -bi`
- Copy contents of a file into the clipboard:
`cat {{file}} | xsel -bo`
- Print the clipboard to STDOUT:
`xsel -bo`
- Print the clipboard into a file:
`xsel -bo > {{file}}`
- Clear the clipboard:
`xsel -bc`