scp stdin

Jeremy C. Reed reed at reedmedia.net
Wed Feb 6 09:56:59 MST 2008


On Wed, 6 Feb 2008, Kevin Faulkner wrote:

> Is it possible to get scp to copy FROM stdin? like this
> xwd -out $(scp $STNDIN kondor6c at 10.0.205.10:/tmp/der/) 
> or am I just doing something wrong? I checked the man page it said
> nothing about accepting input. 

Don't use -out with xwd unless you want it to save to a file. Its default 
is stdout.

Also xwd used like that is interactive. To make it not be interactive use 
the -id switch. Use the "xlsclients -l" command to list the window IDs.

Then instead of scp, use SSH instead.

Here is an example:

 xwd -id 0x440000d | ssh 192.168.1.4 "cat > xwd.out"

(Note that the > is in the quotes!)

On my remote system:

 $ file xwd.out 
 xwd.out: XWD X Window Dump image data, "xterm", 484x316x24

Have fun!

> this isn't time critical I'm just playing around. :) and wanting to get
> away from politics.

Thanks!

  Jeremy C. Reed


More information about the PLUG-discuss mailing list