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]

R: pipelines with paths containing spaces



--- Lun 31/8/09, David Christensen ha scritto:

> Da: David Christensen 
> Oggetto: pipelines with paths containing spaces
> A: cygwin cygwin.com
> Data: Lunedì 31 agosto 2009, 10:27
> cygwin:
> 
> I am having trouble using pipelines with paths containing
> spaces:
> 
> ? ? 2009-08-31 01:16:32 Administrator@p43400e ~
> ? ? $ ls -d /cygdrive/c/Documents\ and\
> Settings/
> ? ? /cygdrive/c/Documents and Settings/
> 
> ? ? 2009-08-31 01:16:50 Administrator@p43400e ~
> ? ? $ ls -d /cygdrive/c/Documents\ and\ Settings/
> | xargs ls
> ? ? ls: cannot access /cygdrive/c/Documents: No
> such file or directory
> ? ? ls: cannot access and: No such file or
> directory
> ? ? ls: cannot access Settings/: No such file or
> directory
> 
> ? ? 2009-08-31 01:16:55 Administrator@p43400e ~
> ? ? $ ls `ls -d /cygdrive/c/Documents\ and\
> Settings/`
> ? ? ls: cannot access /cygdrive/c/Documents: No
> such file or directory
> ? ? ls: cannot access and: No such file or
> directory
> ? ? ls: cannot access Settings/: No such file or
> directory
> 
> 
> I tried writing a Perl script to escape spaces, but that
> didn't work.
> 
> 
> I tried writing a Perl script to wrap paths in single
> quotes and escape
> single quotes, but that didn't work.
> 
> 
> I tried searching the mailing list archive, the FAQ, and
> Google
> variations on 'cygwin pipeline spaces', but didn't come up
> with a solid
> hit.
> 
> 
> I installed Cygwin two days ago.? Attached please find
> cygcheck.out.
> 
> 
> Any suggestions?
> 
> 
> TIA,
> 
> David

not really cygwin specific 

find /cygdrive/c/Documents\ and\ Settings/ -print0 |xargs --null ls

see  "man xargs"

regards
Marco

 





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