LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

yank

Interactively select and copy terminal output

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 reads input from a pipe or file and presents it in a terminal selection interface. The user navigates lines or fields with arrow keys, selects the desired text, and yank copies it to the clipboard or passes it to a specified command.By default, input is split into lines. The -d option sets a custom delimiter for splitting input into selectable fields, useful for extracting specific columns from structured output. The -l option forces line-by-line splitting regardless of content.Clipboard integration works through an external command such as xclip or xsel, specified after --. On systems with X11, the -x flag provides a shortcut for X clipboard access. The tool is designed to fit naturally into Unix pipelines, accepting input from any command that writes to stdout.

PARAMETERS

-d DELIM

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

INSTALL

sudo apt install emboss
copy
sudo dnf install yank
copy
sudo pacman -S yank
copy
sudo apk add yank
copy
sudo zypper install yank
copy
brew install yank
copy
nix profile install nixpkgs#emboss
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid