Hi,
this is part of my script, it does not work, however I believe most of it is there...
{
if ($0 ~ /Error/){
ping = $1
gsub(/\[/, "", var)
gsub(/\//, "\\/", vat);
reg[++arrr]=var
for ( p in reg )
if ($0 ~ reg[p] && /208/)
print $0
}
I search $0 for Error
I assign $1 to the variable var
I add the value of var to array
********
now I wish to loop through the array, and pick out the values from the input file where ping & 208 occur. This much I am unable to do & cannot figure out what the problem is..... Do I need to respecifyt the input file?
this is part of my script, it does not work, however I believe most of it is there...
{
if ($0 ~ /Error/){
ping = $1
gsub(/\[/, "", var)
gsub(/\//, "\\/", vat);
reg[++arrr]=var
for ( p in reg )
if ($0 ~ reg[p] && /208/)
print $0
}
I search $0 for Error
I assign $1 to the variable var
I add the value of var to array
********
now I wish to loop through the array, and pick out the values from the input file where ping & 208 occur. This much I am unable to do & cannot figure out what the problem is..... Do I need to respecifyt the input file?