LinuxCommandLibrary

yank

TLDR

Select and copy

$ echo "[text]" | yank
copy
Custom delimiter
$ echo "[text]" | yank -d "[\n]"
copy
Copy to X clipboard
$ echo "[text]" | yank -x
copy
With selection command
$ echo "[text]" | yank -- xclip
copy

SYNOPSIS

yank [-d delim] [-x] [options] [-- command]

DESCRIPTION

yank copies terminal output. It selects interactively.
Interactive selection. Pick text to copy.
Clipboard integration. Copy selected.
Custom delimiters. Split on anything.
Pipe-friendly. Works with other tools.

PARAMETERS

-d DELIM

Field delimiter.
-x
X clipboard.
-l
Line delimiter.
-- CMD
Yank command.

CAVEATS

Terminal required. Clipboard setup varies. Simple tool.

HISTORY

yank was created for interactively selecting and copying terminal output to the clipboard.

SEE ALSO

xclip(1), xsel(1), fzf(1)

Copied to clipboard