[TAG] Unix

Paul Sephton paul at inet.co.za
Mon Oct 8 11:47:33 MSD 2007


On Mon, 2007-10-08 at 09:16 +0200, Terry T wrote:
> Hie 
> I am new UNIX.I want to copy 30 files with different names using the
> following command.
> 
> ftp -i -s:filename > logfilename.log
> The command works well.
> 
> My problem is to type the same command 30 times for each file name. 
> How do I transfer all the 30 files at the same time?

MASK=*; for i in `ls $MASK`; do 
  ftp -i -s:$i > logfilename.log
done

where MASK is your file selection...





More information about the TAG mailing list