list textfile

John Summerfied debian at herakles.homelinux.org
Thu May 19 21:44:23 UTC 2005


Alexander Dalloz wrote:

> 
> 
>>list.txt
> 
> for i in $(ls -rt); do echo ${i} | cut -b1 | tr "\n" " " >> list.txt;
> done

You can do the redirection thus for better effect:
  for i in $(ls -rt); do echo ${i} | cut -b1 | tr "\n" " " ;
done >list.txt;

Note that I'm not commenting on the loop itself which I think a little odd.

-- 

Cheers
John

-- spambait
1aaaaaaa at computerdatasafe.com.au  Z1aaaaaaa at computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/




More information about the users mailing list