I have a file that contains a list of records, each record is seperated by a blank line. In another file I have a list of user names.
From the file that has the list of user names I need to take each user name and pull out the record for that user.
When I have just one user record to pull out I just use a simple perl oneliner like:
perl -n00e 'print if /^user1/' records.txt
I've tried a few ways to feed this the list of names from the user list but not getting that to work.
How can I get all the records for users.txt from the file records.txt by searching for the name in users.txt in the records file, also have to only search for records
that begin a line with the user name.