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

  • 1
    Image Downloader
    Image Downloader
    Crawl and download images using
    Selenium Using python3 and PyQt5.
    Supported Search Engine: Google, Bing,
    Baidu. Keywords input from the keyboard
    or input from ...
    Download Image Downloader
  • 2
    Eclipse Tomcat Plugin
    Eclipse Tomcat Plugin
    The Eclipse Tomcat Plugin provides
    simple integration of a tomcat servlet
    container for the development of java
    web applications. You can join us for
    discussio...
    Download Eclipse Tomcat Plugin
  • 3
    WebTorrent Desktop
    WebTorrent Desktop
    WebTorrent Desktop is for streaming
    torrents on Mac, Windows or Linux. It
    connects to both BitTorrent and
    WebTorrent peers. Now there's no
    need to wait for...
    Download WebTorrent Desktop
  • 4
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 5
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 6
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • More »

Linux commands

Ad