3
I have a file, file_copy
, which has:
>cat file_copy
file1
file2
file3
I want to copy file1
, file2
, file3
from /source
to /dest
. One way I know how to do this is to just do:
for line in `cat file_copy` ; do cp /source/$line /dest; done
But I know that there is a better way, probably using find/xargs and/or awk, etc. What is the preferred way of doing this?
1Interesting idea. – JakeGould – 2018-08-07T11:39:58.453