hi, this is my script....
/Failure/ {var=$1; gsub(/\[/, "",var); gsub(/\//, "\\/",var)
; flo[1]=var; print flo[1]
}
{
for (i in flo)
if ($0 ~ flo && /end/)
print
else
print "not happening"
}
It seems to be working fine apart from the fact that when I am at this line;
if ($0 ~ flo && /end/)
it searches at the wrong place, it - it doesn't go to the start of the input to look for if ($0 ~ flo && /end/); it looks from the point I find;
/Failure/....
How can I fix this?
/Failure/ {var=$1; gsub(/\[/, "",var); gsub(/\//, "\\/",var)
; flo[1]=var; print flo[1]
}
{
for (i in flo)
if ($0 ~ flo && /end/)
else
print "not happening"
}
It seems to be working fine apart from the fact that when I am at this line;
if ($0 ~ flo && /end/)
it searches at the wrong place, it - it doesn't go to the start of the input to look for if ($0 ~ flo && /end/); it looks from the point I find;
/Failure/....
How can I fix this?