Hello All:
I have a spooled file backup.txt with content in the following format:
LASTBACKUP NUMDAYS
------------------ ----------
11-MAR-10 21:01:15 46
I will like to compare the value in the NUMDAYS column in a shell script. My question is:
1) how can I get the value "46" in a shell script assigned to a variable "i"? (note this could be any value) so that I can say:
if i > 0
cat backup.txt | mailx 'Back did NOT complete last night' backup@dbas.com
else
end if
Thanks for your time
I have a spooled file backup.txt with content in the following format:
LASTBACKUP NUMDAYS
------------------ ----------
11-MAR-10 21:01:15 46
I will like to compare the value in the NUMDAYS column in a shell script. My question is:
1) how can I get the value "46" in a shell script assigned to a variable "i"? (note this could be any value) so that I can say:
if i > 0
cat backup.txt | mailx 'Back did NOT complete last night' backup@dbas.com
else
end if
Thanks for your time