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: "Brian Wilson" <wilson at ds dot net>
- To: albert kao <albertkao3 at gmail dot com>, cygwin at cygwin dot com
- Date: Thu, 30 Sep 2010 11:19:29 -0400
- Subject: Re: use the list of files stored in a text file and process it
- References: <loom.20100929T172802-227@post.gmane.org>
> 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
>
snip...
Try something like "cat test.txt | xargs -i ls {}" or "cat test.txt | xargs -t
ls" I suspect the first one will work for you and the second one will show you
the command line before running the command (to help you debug in future).
Sincerely,
Brian S. Wilson
--
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