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: Jeremy Ramer <jdramer at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 29 Sep 2010 09:50:29 -0600
- Subject: Re: use the list of files stored in a text file and process it
- References: <loom.20100929T172802-227@post.gmane.org>
On Wed, Sep 29, 2010 at 9:39 AM, 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
>
>
$ ls $(cat test.txt)
--
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