Re: chaining ssh commands
From: Darren Tucker (dtucker_at_gate.dodgy.net.au)
Date: 09/26/05
- Next message: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Previous message: Jacques-Olivier Haenni: "Re: chaining ssh commands"
- In reply to: Jacques-Olivier Haenni: "Re: chaining ssh commands"
- Next in thread: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Reply: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 26 Sep 2005 09:12:53 GMT
On 2005-09-26, Jacques-Olivier Haenni <jo_no_spam@haenni.info> wrote:
> This can simply be performed as follows:
>
> ssh me@remotebox 'cd /usr/me; tar -xvf me.tar'
Note that if the "cd" fails it will still run the second command.
In this example it's probably not a big deal, but under other conditions
it might be.
To prevent that, use "&&" instead, eg:
$ ssh me@remotebox 'cd /usr/me && tar -xvf me.tar'
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- Next message: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Previous message: Jacques-Olivier Haenni: "Re: chaining ssh commands"
- In reply to: Jacques-Olivier Haenni: "Re: chaining ssh commands"
- Next in thread: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Reply: Nico Kadel-Garcia: "Re: chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|