delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
X-Authority-Analysis: | v=1.0 c=1 a=iCZ24PropGAA:10 a=kj9zAlcOel0A:10 a=w_pzkKWiAAAA:8 a=cumHSGeAf0b28X13wrwA:9 a=y660oT0pG6Vavmu3NEIA:7 a=vuQmvQb17MrlVQguGRJTPftzlYoA:4 a=CjuIK1q_8ugA:10 a=buB1NfXUTBUA:10 a=IfQ-iFkkCvMA:10 |
Message-ID: | <4CA492AA.6020104@charter.net> |
Date: | Thu, 30 Sep 2010 09:37:46 -0400 |
From: | SJ Wright <sjwright68 AT charter DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
MIME-Version: | 1.0 |
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> |
In-Reply-To: | <loom.20100929T172802-227@post.gmane.org> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
albert kao wrote: > I store a list of files in a text file (test.txt) on Windows XP. > I want to use the list of files and process it (e.g. ls). > What is the command to do that? > I tried the following commands but to no avail. > > $ cat test.txt > test.txt > > $ cat test.txt | xargs ls > : No such file or directory > > $ cat test.txt | xargs -delimiter="\n" ls > xargs: Invalid input delimiter specification elimiter=\n: the delimiter must be > either a single char > acter or an escape sequence starting with \. > > $ cat test.txt | xargs -delimiter='\n' ls > xargs: Invalid input delimiter specification elimiter=\n: the delimiter must be > either a single char > acter or an escape sequence starting with \. > > $ cat test.txt | xargs -delimiter='\\n' ls > xargs: Invalid input delimiter specification elimiter=\\n: the delimiter must be > either a single cha > racter or an escape sequence starting with \. > > $ cat test.txt | xargs -delimiter="\\n" ls > xargs: Invalid input delimiter specification elimiter=\n: the delimiter must be > either a single char > acter or an escape sequence starting with \. > > $ uname -srv > CYGWIN_NT-5.1 1.7.5(0.225/5/3) 2010-04-12 19:07 > > > > -- > 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 > > > I would also suggest that you check your filenames in test.txt to make sure, if you included paths, that they are absolute and follow the Cygwin virtual-paths (cygpath) syntax, i.e.: /cygdrive/c/... or /etc/share/... and so on. Barring that, a path in Unix notation relative to your $PWD -- or the directory where test.txt is saved -- is a good starting point (npi): something along the lines of bin/deprecated or ../man1 . I know one of the trip-ups I often have if I spend any time away from a L/Unix environment has to do with the "mv" command: I often forget that it prefers absolute paths from root folders (or in the case of Cygwin, virtual ones taken as real) or dot-dot-slash relative path syntax to just "/god-directory/" or what-have-you. Many other commands, particularly ls and ln -s, are likewise "particular about their paths." Steve W. -- 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 |