This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ls returning file list as one big string


-----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\"; done
> "Attributes.java
> JarEntry.java

Are you sure you have $IFS set correctly?  Bash does word splitting of ``
output according to the current contents of $IFS, which should normally be
space-tab-newline unless you want to split on different characters.
Whereas the version that avoids `` altogether does not end up using $IFS.

Which means I'm starting to think this problem is not cygwin-specific.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGoozB84KuGfSFAYARAi73AJ0aO7Ltsh7AxZCC6ZlO3NNkItEBBACgpkWI
HIM+k7ugxJbguex74QXQ3Y8=
=mUyz
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]