mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-31 22:15:33 +02:00
xsel: Add page (#882)
This commit is contained in:
parent
b4dea673c7
commit
fac92c4aa1
1 changed files with 36 additions and 0 deletions
36
pages/linux/xsel.md
Normal file
36
pages/linux/xsel.md
Normal 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`
|
Loading…
Add table
Reference in a new issue