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

Burton M. Strauss III Burton_Strauss at comcast.net
Tue May 11 09:45:22 CDT 2004


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

> -----Original Message-----
> From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
> Behalf Of Bobby Wrenn
> Sent: Tuesday, May 11, 2004 9:25 AM
> To: NTLUG Discussion List
> Subject: [NTLUG:Discuss] copy a list to a new directory
>
>
> I want to copy the files in an m3u playlist to a new directory. I know
> it is something like:
>
> for file in list
>          do
>                  cp file .
>          done
> exit
>
> I cna't find a ready example of getting the argument from a file.
>
> TIA
> Bobby
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss




More information about the Discuss mailing list