From fac92c4aa1a1a28f912fcf7ff4942ea67369c897 Mon Sep 17 00:00:00 2001 From: Severen Redwood Date: Tue, 21 Jun 2016 10:36:03 +1200 Subject: [PATCH] xsel: Add page (#882) --- pages/linux/xsel.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/linux/xsel.md diff --git a/pages/linux/xsel.md b/pages/linux/xsel.md new file mode 100644 index 000000000..20b8e362f --- /dev/null +++ b/pages/linux/xsel.md @@ -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`