Can I copy text to the clipboard from one file by shell? and I want to paste it to Browser later.

link|improve this question
search for xclip – Zoredache Feb 2 at 6:01
feedback

migrated from serverfault.com Feb 5 at 16:35

This question came from our site for system administrators and desktop support professionals.

1 Answer

You want xclip.

$ xclip -i -selection clipboard <<< "*foo bar*"

foo bar

link|improve this answer
the -i switch is optional i seem to remember – ixtmixilix Feb 8 at 0:11
@ixtmixilix: Sure. But it doesn't hurt to be explicit. – Ignacio Vazquez-Abrams Feb 8 at 1:33
feedback

Your Answer

 
or
required, but never shown