Hi all,
I've been away from scripting for a while, i've hit a brick wall with a script i'm writing!
The data file has the following:
zone: nameserver_absvc01a
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:01:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
zone: nameserver_absvc01a
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:01:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
etc etc
I need to check the first line contains svc then once thats found it needs to make sure there are 10 lines before the next zone. So far i've got, which is a start but man am I rusty !!!
finderror ()
{
for zone in logfile
do
ZONENAME=$(cat test.log|grep zone
echo "$ZONENAME" |awk '{print $2}'
done
}
I've been away from scripting for a while, i've hit a brick wall with a script i'm writing!
The data file has the following:
zone: nameserver_absvc01a
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:01:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
zone: nameserver_absvc01a
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:01:00:00:00:00:00:00
10:00:00:00:00:00:00:00
10:00:00:00:00:00:00:00
etc etc
I need to check the first line contains svc then once thats found it needs to make sure there are 10 lines before the next zone. So far i've got, which is a start but man am I rusty !!!
finderror ()
{
for zone in logfile
do
ZONENAME=$(cat test.log|grep zone
echo "$ZONENAME" |awk '{print $2}'
done
}