Subj : Re: Backup script tuning To : MeaTLoTioN From : paulie420 Date : Fri Sep 16 2022 07:01:12 Me> Try setting retVal after running the rsync, $? is only populated on Me> completion either successfully "0" or failure "1-127" of any command. Me> Me> So, you need really; Me> Me> rsync blah blah Me> retVal=$? Me> Me> do some stuff... Me> Me>if [[ $retVal -gt 0 ]]; then Me> # some stuff happened but it failed Me>else Me> Me> Also, you're defining use of /bin/bash as your shebang, but using posix Me> if statements. Me> Me> if using bash, if should be; Me> Me> if [[ $var -gt 0 ]]; then Me> Me> if using posix, if should be; Me> Me> if [ $var -gt 0 ]; then Ah - ok, understood; thank you for both of your replies. I'm sure I can iron it out with the info you provided. The guide I read must not have mentioned to setup using #!/bin/bash, and I was just used to doing so. Derp. |07p|15AULIE|1142|07o |08......... --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64) * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129) .