Hi,
i have the following script, where i'm looking for 2 different actions dependant on the outcome.
However, no matter what i do, the script just performs the same action. can you help please
cheers
Rich
#!/bin/ksh
WORKING_DIR=/opt/openv/netbackup/scripts/daily
recipients=$WORKING_DIR/to_email
word="inactive"
file=$WORKING_DIR/nbftconfig.txt
cmd=$(grep -ci "$word" $file)
if [ "cmd" != "0" ]; then
cat $file | unix2dos | uuencode $file | mailx -s "Inactive San Client Devices" rs@test.com
else
mailx -s "all Looks Hinky Dorey" rs@test.com
Cheers
richs24
i have the following script, where i'm looking for 2 different actions dependant on the outcome.
However, no matter what i do, the script just performs the same action. can you help please
cheers
Rich
#!/bin/ksh
WORKING_DIR=/opt/openv/netbackup/scripts/daily
recipients=$WORKING_DIR/to_email
word="inactive"
file=$WORKING_DIR/nbftconfig.txt
cmd=$(grep -ci "$word" $file)
if [ "cmd" != "0" ]; then
cat $file | unix2dos | uuencode $file | mailx -s "Inactive San Client Devices" rs@test.com
else
mailx -s "all Looks Hinky Dorey" rs@test.com
Cheers
richs24