On Tue, 25 May 1999, Jim Foltz wrote: > > There are times when I need to cut and paste the output from a command > line program into a graphical program. The problem occurs when the output > is more than one screen long. I just thought it would be quite nice to > be able to redirect the output into /dev/clipboard, then switch to the > graphical program and use the mouse to paste it from /dev/clipboard to > where I need it. > > Is there a mechanism already in place to handle this? >
You could just redirect the command output to a file, then open the file in an editor like Emacs (in X mode), select it there and paste it into the graphical program. For example: $ mycommand > file 2>&1 Where 2>&1 sends error messages to the file also; omit that part if you only want normal output in the file. There's also such a thing as a FIFO (first-in first-out), you use it like this: $ mkfifo foo $ echo "Hello World" > foo Then in another console or xterm: $ cat foo Hello World But I don't think that's quite what you want. (Note that a second 'cat foo' won't say "Hello World", because the FIFO is like a pipe, it doesn't save the data.) HTH, Havoc