Paste clipboard is bash or shell scripts with modification.
Today I had a issue where I wanted to paste the clipboard to a shell script after removing the spaces. So, I went hunting for a way to do this. Finally I came up with this:
sudo yum install xclip
Then you can paste the clipboard content using ”xclip -o”. So now the problem is reduced to selecting the required info and doing :
xclip -o |sed ’s/ //g’
or
xclip -o|tr -d ’ ’
Related Articles:
- 2010/06/29 CLI Color and bash prompt.. some colored fun with prompts in bash
- 2010/06/29 Getting your wordpress self hosted stats on your console with bash script.
- 2010/06/25 Delete Files older than 14 days
- 2010/06/25 Magic space on the current command line
- 2010/06/25 bash one liner to change/remove test pattern from config file or text file.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.