Hi this is probabaly a simple error but I just cant get this part of my script to run, it looks as follows....
{
found=0;
if ( $0 ~ /Test/ )
for(i in ARRAY)
if(match($0, i))
print $1
( It's working fine to here - then at this poing I need to get the Value of $1 ( this is the very first value in $0 - if it matches.... ) and pass it down to the next part... i.e. d=0 part )
reg[0]=$1
found++
}
{
d = 0
for ( j in reg )
if(match($0, j))
if ( $0 ~ j && $0 ~ /try again/ )
print
d++
}
Hope I have made this clear - I have been trying to get this working for some time using arrays etc. to no avail.
Lambros
{
found=0;
if ( $0 ~ /Test/ )
for(i in ARRAY)
if(match($0, i))
print $1
( It's working fine to here - then at this poing I need to get the Value of $1 ( this is the very first value in $0 - if it matches.... ) and pass it down to the next part... i.e. d=0 part )
reg[0]=$1
found++
}
{
d = 0
for ( j in reg )
if(match($0, j))
if ( $0 ~ j && $0 ~ /try again/ )
d++
}
Hope I have made this clear - I have been trying to get this working for some time using arrays etc. to no avail.
Lambros