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
    Stacer
    Stacer
    Linux System Optimizer and Monitoring
    Github Repository:
    https://github.com/oguzhaninan/Stacer.
    Audience: End Users/Desktop. User
    interface: Qt. Programming La...
    Download Stacer
  • 2
    OrangeFox
    OrangeFox
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    built...
    Download OrangeFox
  • 3
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 4
    Clementine
    Clementine
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 5
    XISMuS
    XISMuS
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    i...
    Download XISMuS
  • 6
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • More »

Linux commands

Ad