A Windows utility that simply dumps the clipboard data to stdout.
Tiny and safe, xpaste includes format checks and has zero dependencies.
Usage: xpaste --[cr]lf (by default keep an original line ending).
A Windows utility that copy text from stdin or command line arguments to the clipboard.
Tiny and safe, xclip includes charset checks and has zero dependencies, including on the standard library.
Usage (by default, think stdin UTF-8 encoded):
x-clip: [-a|--ansi[i] | -u|--ucs2|--unicode] <<< DATA
[--] string to copy
Examples:
$ xclip < utf8.txt # tail line endings are always trimmed
$ cat uincode-list.txt | x-clip -u
$ xclip -- here is a line to copy
$ xclip here is another line to copy
$ xclip --help # equals with empty argumentsTh snippet below supports:
- copy using stdin/arguments & paste using stdout
- paste to a file by
paste a.txt - paste to a local variable by
paste -var foo - copy a file's content by
clip a.txt
function xpaste() {
local arg=$1
if test