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

Re: [OT] Collective memory query



On Mon, Sep 27, 2004 at 06:38:03PM +0200, Adrian 'Dagurashibanipal' von Bidder wrote:
> > for foo in `find . -name "something"`
> 
> Note that 
> $ for foo in `command outputting a list of filenames`
> 
> should *always* be replaced by
> 
> $ said command | while read foo; do ...
> 
> (Or, for trivial cases, xargs) because the for loop will not work with more 
> than a few hundred files.

What does exacly "more than a few hundred files" mean?

for i in `ls -R /usr/`; do echo $i; done

Works fine both in bash and zsh.

(fenio@domek)~$for i in `ls -R /usr/`; do echo $i; done | wc -l 
103464
(fenio@domek)~$

So what is the magic barrier when this should stop working?
I'm just curious.

regards
fEnIo

-- 
      _      Bartosz Fenski | mailto:fenio@o2.pl | pgp:0x13fefc40 | IRC:fEnIo
    _|_|_     32-050 Skawina - Glowackiego 3/15 - w. malopolskie - Polska
    (0 0)          phone:+48602383548 | Slackware - the weakest link
ooO--(_)--Ooo  http://skawina.eu.org | JID:fenio@jabber.org | RLU:172001

Attachment: signature.asc
Description: Digital signature


Reply to: