As a technology worker, I live in web-based ticketing systems. As such, you generally get some data, such as a command or list of hosts, you need to work with in a shell.
For may years my work flow was:
- highlight whatever it is in the ticket
- Crtl-C
- switch over to my terminal
- open a txt file
- Shft-Ctrl-V
- save file
- parse file.
This is where xsel shines. xsel is a wonderful tool for storing and retrieving data on the command line.
For example:
# xsel -b
is used for pasting AND copying to the system clipboard. This allows you to things like
# xsel -b | awk '{print $1}' |xsel -b
on a column of hostnames and, say, their description you Ctrl-C from a ticket.
Cooler still, in Ubuntu, you can eliminate the Crtl-C part and just manipulate what you’ve highlighting with bare xsel
.
There are a few tools for manipulating clipboards for different OSes. xsel
and xclip
and prominent in the Linux space. I believe pbcopy
/pbpaste
are for OSX.