Paste clipboard is bash or shell scripts with modification.

2010-07-20 1 min read bash Linux

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 ’ ’

comments powered by Disqus