Internal variable

i have a file named (Loop) that contains numbers separated by pipelines
e.g. :

521|55
545|564
.
.
.

and another file named (search) that contains numbers e.g.:

99999777|332|332
31215648|458|764

when i run this Script:

nawk 'BEGIN{FS="|"}
NR==FNR{a[$1"|"$2"|"]= $1"|"$2"|";next}
a[$1"|"$2"|"]{print "found";next}1' Loop search| grep -v found  | grep -v "^[1-2]|"> final
 

this script is supposed to compare the files (loop) to the file (search), if there's something in (search) that doesn't exist in the (Loop), the output will be redirected to a file named (final), but i can't seem to understand how it works!!!

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

thanx for ur feedback, it's my first time using unix forums, i'll make sure to follow the guidlines