Re: ls returning file list as one big string

2007-07-21 Thread Olivier Lefevre
Duh! You are right: in a fresh shell this works correctly. I must inadvertently have mucked with IFS in another script earlier. Thanks! -- O.L. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http:

Re: ls returning file list as one big string

2007-07-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Olivier Lefevre on 7/21/2007 4:26 PM: >> I am unable to reproduce this. Perhaps you can paste the entire contents >> of a directory in question? > > $ cd /c/Java/j2sdk1.5.0/src/java/util/jar > > $ for i in `\ls *.java`; do echo \"$i\";

Re: ls returning file list as one big string

2007-07-21 Thread Olivier Lefevre
for i in *.java; do sed -e "$i"; done Thanks, I hadn't thought of getting rid of the ls; this works. I am unable to reproduce this. Perhaps you can paste the entire contents of a directory in question? $ cd /c/Java/j2sdk1.5.0/src/java/util/jar $ for i in `\ls *.java`; do echo \"$i\"; done

Re: ls returning file list as one big string

2007-07-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Olivier Lefevre on 7/21/2007 3:21 PM: > As the subject says, ls returns the file list as one big string for some > directories but not others. One sign of that is that, e.g., > > for i in `\ls *.java`; do sed -e $i; done Why not do s

ls returning file list as one big string

2007-07-21 Thread Olivier Lefevre
As the subject says, ls returns the file list as one big string for some directories but not others. One sign of that is that, e.g., for i in `\ls *.java`; do sed -e $i; done fails with "File too long". Once can prove it with for i in `\ls *.java`; do echo \"$i\"; done which will retur