Here is the scenario I'm dealing with:
My company has a bunch of old servers and workstations that have data on them that I need to copy to a "drobo" (multi-storage device) and eventually send the storage unit to someone else. I have a list of "contract numbers" that I need to search for on the disks and then copy them to the storage media.
Here's what I've tried so far:
a) I've created a list with all the contract numbers I need to search for and placed them in a file
b) Tried creating a foreach/for script that cat's the file:
foreach n (`cat list.txt`)
foreach? ls -lR
foreach? grep -i $n
foreach? cpio -pdmv /destination/
For one I don't know how to put that all into a file and create a real loop and the cpio copy fails giving me errors that it "there's no files found.
Hopefully, I've given you enough info to at least get us started. I know it's a simple script and won't require much, but it's something that would really help.
If you could do this asap I would cetainly appreciate it