I am using a ksh script. Please help me read and get values from this file called stat.txt:
I need to check the values of Statcode, if I get a value of 0 or 4, then echo "Status Ok". If I get other values, say Statcode is 8 or 12, echo "Error" and Exit 1.
Any help would be great. Thanks.
Code:
Job information for Job ID '465' using a Traditional view
Job "PD1002_predefined" - 2007-06-21 20:32:18
(ID 465)
Operation: ARCHIVE
TDPID: 1
Streams: 3
Stream Client Size Time Statcode
------ -------------------- ------------------- --------- --------
1 sldgpp01 9,501,272 09:09:25 4
2 sldgpp02 376,857,925,467 09:09:24 4
3 sldgpp03 9,501,270 09:09:23 12
I need to check the values of Statcode, if I get a value of 0 or 4, then echo "Status Ok". If I get other values, say Statcode is 8 or 12, echo "Error" and Exit 1.
Any help would be great. Thanks.