You are not logged in.
$MTARC || $ $E "Baclup failed"; exit 1
Three things wrong with that:
· The stray '$'
· exit 1 will get executed whether $MTARC works or not
· 'backup' isn't spelled with an 'l'I think you meant:
$MTARC || { $E "Backup failed"; exit 1 }
While you're searching to find out how to use getopts, I suggest you look up sh functions too. Using them would improve your code.
- olly
Offline
olly-bh that dont work.. I have to do $MTARC || { echo "Backup failed"; exit 1}; } How come its diff then what u said.. If i do what you said i get the little > thing.. Cause i tried in terminal not in the script..
Offline