You are not logged in.

#26 2004-06-20 00:06:54

olly-bh
Member
Registered: 2004-04-22
Posts: 14

Re: Help with script..

$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

#27 2004-07-04 21:01:01

iotc247
Member
From: Florida
Registered: 2004-05-31
Posts: 177
Website

Re: Help with script..

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

Board footer

Powered by FluxBB