use the list of files stored in a text file and process it

Henry S. Thompson ht@inf.ed.ac.uk
Thu Sep 30 13:45:00 GMT 2010


-----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



More information about the Cygwin mailing list