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: LS and spaces in path names (the xth)


http://cygwin.com/acronyms/#PCYMTWLL PLEASE!

* Andreas Eibach (2005-06-28 14:14 +0100)
> Yes, this is the umpteenth time this gets asked, but also the umpteenth plead to fix this in cygwin (as it _definitely_ works in Linux, also with vfat and non-Linux partitions!!)

This is probably the umpteenth time said that this has absolutely
nothing to do with Cygwin, Linux or file systems.

> I have two files in ~, say they're 
> 
> CD0.dat
> CD1 - Multimedia (foo1).dat
> CD2 - Multimedia2 (foo2).dat

So you have THREE files, right?!

> +++++++++++++++++++++++++++++++++++++++++
> Precondition: Imagine that the 'TAB' key doesn't function.
> +++++++++++++++++++++++++++++++++++++++++
> (since if I want to write a script, it should be _portable_; and if 
>  it can be only be made work _with_ TAB, it is a kludge and 
>  should be fixed properly. Period.)

File name completion doesn't work in a script?! Really? Maybe because
completion is an interactive functionality?!
 
> But why?
> After the 'CD', what character is this in Cygwin?

Cygwin doesn't have file names.

> It seems, it's not a valid character at all!
> At least it does not seem to be a "real" space, since I've tried
> using option -b in LS and got nothing but also this '\ ' crap.

It's called "escaping". In this case the space character was escaped.

> Needless to say that scripts containing
> 
> for i in `ls *.dat*`; do .... 

Aaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrggggggggggggggghhhhh.

> will NOT work, because Cygwin will interpret each sub-string between the \ ' s separately, making parsing files a nuisance.
> I scanned the archives and found something about using xargs. I've never used this command (except for finding strings); but if Cygwin is called a "win32 unix layer" shouldn't it behave like Unix and at least WORK with the above line?
> 
> You can't deny at least one of these shown DO work in Unix and Linux.
> Without kludges, that is. So I'd say this is an issue and should at least be tackled.

Do yourself a BIG favour: get some basic knowledge about Shells (bash,
etc) and realise that none if this is even remotely related to Cygwin
or Linux/Unix. You're not even using Cugwin - you are using a shell
(bash or whatever).

If this weird stuff you're trying to do "works" in Linux than because
you're using a different shell there. Please try at least to know the
name of the application you are using.

Thorsten


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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