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
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 2
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 3
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 4
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 5
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 6
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • More »

Linux commands

Ad