Hello,
I have a file say id.dat
In this file each line contains only an id number.
I have a group of files (say 1.dat, 2.dat, 3.dat,...., 50.dat). There are unspecified number of records in each of them.
If any of these records contain any of the id number present in id.dat, then that record is copied to a new file say file.dat
So, to summarize we need to collect all the records from group of files (say 1.dat, 2.dat, 3.dat,...., 50.dat) which contain the id numbers from id.dat into a single file called new.txt
note please:
1) records are all of not same size
2) id numbers in records( in files 1.dat, 2.dat, 3.dat,...., 50.dat) may be at different positions. so we need to search id numbers in records using some substring concept.
Configuration: Unix shell scripting