EnglishFrenchSpanish

OnWorks favicon

yank-cli - Online in the Cloud

Run yank-cli in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command yank-cli that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


yank — yank terminal output to clipboard

SYNOPSIS


yank [-lx | -v] [-d delim] [-g pattern [-i]] [-- command [argument ...]]

DESCRIPTION


Read 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, see
DELIMITERS.

Using the arrow keys will move the selected field. The interface support several Emacs like
key bindings, see COMMANDS. Pressing the return key will invoke the yank command and write
the selected field to the its stdin. The yank command defaults to xsel(1) but could be
anything that accepts input on stdin. When invoking yank everything supplied after the --
option will be used as the yank command, see EXAMPLES.

OPTIONS


-d delim
all input characters not present in delim will be recognized as fields, see
DELIMITERS

-g pattern
use the regular expression pattern to recognize fields expressed as a to POSIX
extended regular expression

-i ignore case differences between pattern and the input

-l use the default delimiters except for space, see DELIMITERS

-v prints version

-x use alternate screen

-- command [argument ...]
use command with zero or more argument as the yank command

COMMANDS


Ctrl-A move selection to the first field

Ctrl-C exit without invoking the yank command

Ctrl-E move selection to the last field

Ctrl-N or Right
move selection to the right

Ctrl-P or Left
move selection to the left

Down move selection to the next line

Up move selection to the previous line

Enter exit using the selected field

DELIMITERS


If the -d and -g options are omitted the following characters are recognized as delimiters
by default:

\f form feed

\n new line

\r carriage return

\s space

\t horizontal tab
If the -d option is present space is not recognized as a delimiter.

EXAMPLES


Yank a environment variable key or value:

env | yank -d =

Yank a field from a CSV file:

yank -d \", <file.csv

Yank a whole line using the -l option:

make 2>&1 | yank -l

If stdout 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

Yank the selected field to the clipboard as opposed of the default primary clipboard:

yank -- xsel -b

DIAGNOSTICS


The yank utility exits 0 on success, and >0 if an error occurs.

Use yank-cli online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

Linux commands

  • 1
    a2crd
    a2crd
    a2crd - attempts the conversion of
    lyrics file into chordii input ...
    Run a2crd
  • 2
    a2j
    a2j
    a2j - Wrapper script to simulate
    a2jmidid's non-DBUS behaviour though
    a2jmidid actually being in DBUS mode ...
    Run a2j
  • 3
    cowpoke
    cowpoke
    cowpoke - Build a Debian source package
    in a remote cowbuilder instance ...
    Run cowpoke
  • 4
    cp
    cp
    cp - copy files and directories ...
    Run cp
  • 5
    gbnlreg
    gbnlreg
    gbnlreg - Non linear regression ...
    Run gbnlreg
  • 6
    gbonds
    gbonds
    gbonds - U.S. savings bond inventory
    program for GNOME ...
    Run gbonds
  • More »

Ad