[wellylug] ssh scripting

Andrej andrej at paradise.net.nz
Fri May 20 21:24:23 NZST 2005


On Fri, 20 May 2005 21:13, Jamie Baddeley wrote:
> > ssh user at host.com 'df -h'  will give you the output of the
> > df command run on the remote host
> Sure. What I was wanting to do is run a series of commands
> remotely, and process the results locally. I could do a mean
> seqence of command| command etc, but I thought it might be
> funky to see if I could do it this way.
Same thing ... 

ssh user at host "df -h; free; ls -ltr /var/log/"

The commands run remotely, the output comes locally.

Your job is just the parsing ;)


Cheers,
Andrej




More information about the wellylug mailing list