delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
Subject: | Re: use the list of files stored in a text file and process it |
References: | <loom DOT 20100929T172802-227 AT post DOT gmane DOT org> |
From: | ht AT inf DOT ed DOT ac DOT uk (Henry S. Thompson) |
Date: | Thu, 30 Sep 2010 08:52:48 +0100 |
In-Reply-To: | <loom.20100929T172802-227@post.gmane.org> (albert kao's message of "Wed, 29 Sep 2010 15:39:10 +0000 (UTC)") |
Message-ID: | <f5b7hi3d5wv.fsf@calexico.inf.ed.ac.uk> |
User-Agent: | Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (linux) |
MIME-Version: | 1.0 |
X-Edinburgh-Scanned: | at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
-----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 - --=20 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 AT inf DOT ed DOT ac DOT uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail from me _always_ has a .sig like this -- mail without it is forged s= pam] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFMpEHTkjnJixAXWBoRAvcjAJ4uo9c819hzVbbVovyTN8z4+/g2HQCfShCC pFsvAO0QacPuXcIQjsKqWVY=3D =3D9ZJi -----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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |