3

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

1
  • search for xclip
    – Zoredache
    Feb 2, 2012 at 6:01

1 Answer 1

4

You want xclip.

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

foo bar

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

You must log in to answer this question.