in reply to Detecting failed piped command run via ssh
e.g. (escaping as required)
... or similar :-D# ssh $HOST "cat > /tmp/script" << ! rm -f /tmp/files /tmp/contents sudo find $TARGET_DIR -name \'$TARGET_FILE\' > /tmp/files || exit $? sudo cat /tmp/files | cpio -oBO /tmp/contents --format ustar" || exit +$? bzip2 -9 -c /tmp/contents || exit $? exit 0 ! # ssh $HOST "sudo sh /tmp/script"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detecting failed piped command run via ssh
by devnull (Initiate) on Apr 08, 2009 at 11:02 UTC |