This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: use the list of files stored in a text file and process it
- From: ht at inf dot ed dot ac dot uk (Henry S. Thompson)
- To: cygwin at cygwin dot com
- Date: Thu, 30 Sep 2010 08:52:48 +0100
- Subject: Re: use the list of files stored in a text file and process it
- References: <loom.20100929T172802-227@post.gmane.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You will also run into problems with xargs and filenames with spaces
in. In my experience, the simplest thing that works reliably with
xargs and all Windoz filenames is xargs -0, so what you want is
> tr -s '\012\015' '\000' < test.txt | xargs -0 ls
Note also that find has a -print0 flag, which goes well with -0
> find . -name '[whatever]' ... -print0 | xargs -0 ...
ht
- --
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFMpEHTkjnJixAXWBoRAvcjAJ4uo9c819hzVbbVovyTN8z4+/g2HQCfShCC
pFsvAO0QacPuXcIQjsKqWVY=
=9ZJi
-----END PGP SIGNATURE-----
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple