[NTLUG:Discuss] copy a list to a new directory

Bobby Wrenn bjwrenn at augustmail.com
Tue May 11 11:05:56 CDT 2004


Burton M. Strauss III wrote:
> It's the `` (left leaning quotes) - these execute the command and put the
> results into the command line.
> 
> for file in `ls -1 /some/other/directory`; do
>  cp $file .
> done
> 
> -----Burton
> 
Not exactly. I want to provide the list of files to copy from a file. 
There are files in each directory that are not on the play list. I want 
to copy the file on the play list into a single directory in order to 
convert and burn them onto CDs.

So would this work:

for file in 'somefilename'; do
cp $file .
done





More information about the Discuss mailing list