Re: list textfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux