I have file with set of records. I have to find if the record is available in the set if files and if yes need to get the file names of it.
-rw-rw-r-- 1 ftpuser pfus 131868931 Oct 3 10:45 50.h
-rw-rw-r-- 1 ftpuser pfus 135538052 Oct 3 10:46 51.h
-rw-rw-r-- 1 ftpuser pfus 123051798 Oct 3 10:47 52.h
-rw-rw-r-- 1 ftpuser pfus 123583711 Oct 3 10:48 01.h
The record in unmatch can be in any of the file 50.h,51.h,52.h,01.h. The record search should happen only on 1-8 position. I have to take the record from unmatch and then compare with all 1-8 position record in 50.h,51.h,52.h,01.h and the print the result where ever it matched.
Yes each line of unmatched will be in any of the set of the file with *.h . I have to take a record from unmatch and find if they are available on 1,8 position on *.h and print the record and the file *.h name where it was found.
I executed the awk. it is giving me the record. How can I get the file name too.
The Following User Says Thank You to arunkumar_mca For This Useful Post: