FNR - File Relative Number of Records in UNIX

When NR is applied for multiple files, the count gets incremental and it does not provide count with respective to any file. To overcome this, FNR can be used

Example : FNR count is reset when a new file is processed and the count starts from 1