Hi guys
First thing to say is that I am entirely new to Shell Scripting and am trying to write a script to do something I thought would be relatively simple, but has escaped me.
Essentially, I want to take file name information from a list, find the files listed and then copy the results into an output directory. As a standard command line I use this:
for i in `cat example_list` ; do find . -name "$i" | xargs -i rsync -Rruv {} /detination_directory/; done
This is fine, but a bit difficult to explain to new users of Linux, so I was looking to simplify this into a script
eg:
search_copy_list [which list] [output dir]
I have had a look around, but the fundamental basics are escaping me, I can't seem to find any help on how to index the list to find the files.
If anyone could help, that would be awesome because I'm missing something here.
Thanks
Adrian