xclip is for CLI Copy/Paste.

Notes on software development

Copying

The following command

echo "foo" | xclip -selection clipboard

will copy “foo” to you clipboard. Try pasting it elsewhere. The clipboard selection is the one used by Ctrl-C Ctrl-V commands. The default selection of xclip is the one used when you select text in linux (XA_PRIMARY).

A shorter version would be:

echo "foo" | xclip -sel c

Pasting

You can also send the contents of the current clipboard to the terminal (useful for piping).

xclip -sel c -out

Or

xclip -sel c -o

View original post

Advertisements

About samehramzylabib

See About on https://samehramzylabib.wordpress.com
This entry was posted in UNIX Command Line. Bookmark the permalink.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s