Hey Gang,
I've got a situation where an old (non-linux) mail server crashed. I've got mal for a bunch of people, but the way this server worked, it's in all sorts of different directories, and each mail is split into two pieces, a .hdr (with all the header info, like TO: From: and Subject
and .msg file that has all the actual message info. The .hdr and .msg both have the same filename, with a different extension and are always both in the same directory.
I've got all the folders, what I'd like to do is to search for an individual's email addres in the .hdr message (grep) then identify the file (find) and copy it and it's counterpart .msg message to another directory (cp). Once that's done, I want to create a new file that is a concatenation of, first the .hdr and then the .msg and have it named the same as the .hdr and .msg, but with a .fin extension.
I know that this should be very doable from the bash command line using just the four tools listed, but I am woefully ignorant of proper syntax to bring it all together.
ANY help would be GREATLY appreciated. Heck... I'm thankful if you've just read this far!

Joe
I've got a situation where an old (non-linux) mail server crashed. I've got mal for a bunch of people, but the way this server worked, it's in all sorts of different directories, and each mail is split into two pieces, a .hdr (with all the header info, like TO: From: and Subject
I've got all the folders, what I'd like to do is to search for an individual's email addres in the .hdr message (grep) then identify the file (find) and copy it and it's counterpart .msg message to another directory (cp). Once that's done, I want to create a new file that is a concatenation of, first the .hdr and then the .msg and have it named the same as the .hdr and .msg, but with a .fin extension.
I know that this should be very doable from the bash command line using just the four tools listed, but I am woefully ignorant of proper syntax to bring it all together.
ANY help would be GREATLY appreciated. Heck... I'm thankful if you've just read this far!
Joe