JtheRipper
IS-IT--Management
Hi there,
I am quite new to shell scripting and need some help with the following:
I have a text file that looks like the following:
ops$ret11111 1
ops$abs12344 1
ops$kke23412 1
ops$het29845 0
ops$hyt24556 0
ops$uye23322 1
.
.
.and so on...(800+lines)
I want to loop through the list and create 2 variables, field1 with the names and field2 with the count.
If field2 = 0
then send email "field1 has a count of 0"
fi
My script looks as follows:
FILE=acc.lst
typeset ROWS=$(wc -l < $FILE )
ROWS=`expr $ROWS + 0`
NUM=`expr $ROWS - 2`
head -$NUM $FILE > temp.txt
FILE3=temp.txt
--here i must start to go through $FILE3 and look for count of 0--
Any help on this will be appreciated!
Thanks,
Jaco
I am quite new to shell scripting and need some help with the following:
I have a text file that looks like the following:
ops$ret11111 1
ops$abs12344 1
ops$kke23412 1
ops$het29845 0
ops$hyt24556 0
ops$uye23322 1
.
.
.and so on...(800+lines)
I want to loop through the list and create 2 variables, field1 with the names and field2 with the count.
If field2 = 0
then send email "field1 has a count of 0"
fi
My script looks as follows:
FILE=acc.lst
typeset ROWS=$(wc -l < $FILE )
ROWS=`expr $ROWS + 0`
NUM=`expr $ROWS - 2`
head -$NUM $FILE > temp.txt
FILE3=temp.txt
--here i must start to go through $FILE3 and look for count of 0--
Any help on this will be appreciated!
Thanks,
Jaco