devnull has asked for the wisdom of the Perl Monks concerning the following question:
Initially I just redirected the output to a file, which is fine if both the $TARGET_DIR and $TARGET_FILE exists. However, if one or both do not exist, then I still get a file created, but it's an empty .tar.bz2 file of a few bytes.ssh $TARGET_HOST "sudo find $TARGET_DIR -name \'$TARGET_FILE\' | sudo cpio --create --format ustar" | bzip2 -9 -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Detecting failed piped command run via ssh
by cdarke (Prior) on Apr 08, 2009 at 09:18 UTC | |
by devnull (Initiate) on Apr 08, 2009 at 10:50 UTC | |
by cdarke (Prior) on Apr 08, 2009 at 11:53 UTC | |
|
Re: Detecting failed piped command run via ssh
by Bloodnok (Vicar) on Apr 08, 2009 at 09:27 UTC | |
by devnull (Initiate) on Apr 08, 2009 at 11:02 UTC |