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: use the list of files stored in a text file and process it


On Wed, Sep 29, 2010 at 03:39:10PM +0000, 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

It looks like you have CRLF line endings in the file.  Run test.txt
through d2u and the above command should work.  It looks like you
can't just use xargs --delimiter since that option takes only a
single character.

So:

d2u < test.txt | xargs ls

cgf

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


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