The yank utility reads input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard. Fields are either recognized by a regular expression using the -g option or by splitting the input on a delimiter sequence using the -d option.



# Yank an environment variable key or value:
env | yank -d =

# Yank a field from a CSV file:
yank -d \", <file.csv

# If stdou is not a terminal the selected field will be written
# to stdout and exit without invoking the yank command.
# Kill the selected PID:
ps ux | yank -g [0-9]+ | xargs kill