Hey Guys,
Just a real quick BASH question that I'm sure will be simple but it's holding me up from testing something relating to the other threat I've got...
If I have a list of file locations in a variable, how can I print the contents of that variable into a copy command?
For example:
cat $FILES would display:
./file1
./file2
But in the script I'd like to do something like
Code:
cp file1 file2 /tmp
I've tried:
Code:
cat $FILES | cp - /tmp
Code:
cat $FILES | cp <&1 /tmp
none of the above work and I can see why.. but is there something that I'm missing?
Thanks
Jon