...
port111 3 10.14.5.55 57
port111 2 10.14.5.55 51
port111 1 10.14.5.55 59 -> this line must be taken
...
port111 1 10.14.6.66 63 -> this line must be taken
port111 2 10.14.6.66 64
port111 3 10.14.6.66 65
port111 4 10.14.6.66 66
...
port113 3 10.14.7.77 72 -> this line must be taken
port113 1 10.14.7.77 74
...
port140 1 10.14.8.88 84
port140 2 10.14.8.88 84 -> this line must be taken
port140 5 10.14.8.88 84
...
port613 4 10.14.9.99 92 -> this line must be taken
port613 2 10.14.9.99 92
...
i need a code for;
take ip & sector numbers, from rollbackip.txt
search ip and sector numbers related to each, from lookup.txt
get original values of each ip & sector, from ip-port.txt and write these original values to file result.txt.
to conclude, the new rollbackip.txt file should be:
result.txt:
nawk: syntax error at source line 1
context is
>>> {if(FILENAME=="rollbackip.txt"){a[$1$2]++;next;}if(FILENAME=="ip-port.txt"){b[$3$2]=$4;next;}if(FILENAME=="lookup.txt"){if( <<<
nawk: illegal statement at source line 1
nawk: syntax error at source line 1
do i have to change {if(FILENAME==/home/gcsw/.../rollbackip.txt like this? i have tried both, but no result..