3

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

migrated from serverfault.com Feb 5 '12 at 16:35

This question came from our site for system and network administrators.

  • search for xclip – Zoredache Feb 2 '12 at 6:01
4

You want xclip.

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

foo bar

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy