The paradigm is that you process a file one record at the time. The records are separated by by the value of RS variable [NewLine by default].
The "current" record is accessed by by either $0 in its entirety.
There's no "explicit" operator to go back to the FIRST record read - once the record has been processed it's gone.
You can "save" a particular record [FIRST for example] explicitely in your code and make your processing decissions based on the content of the "saved" record.
Is that something that you're after?
vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
You see the problem with my assignment, is that once my script uses processes the record, I need to assign a variable to the relevant record, then go back and test this variable against the entire input record again. Is this possible?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.