scp -c arcfour source destination; echo $? if [ $?>0 ] ; then // echo 1
Above is what I have so far (this is a hook in another script) but I am looking to hand off a return code to another script. So, if the scp command fails and returns a non 0 then echo 1 and stop the remaining script from executing. Also I have many scp commands in this script, that is why after one fails I don't want it to continue. I am a fairly new admin so bare with me as my scripting isn't the best. Please provide any help. Thanks.
[link][14 comments]