This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: "ls" finds file1 but "ls file1" does not
- From: "Gary R. Van Sickle" <g dot r dot vansickle at worldnet dot att dot net>
- To: <cygwin at cygwin dot com>
- Date: Tue, 10 May 2005 18:07:25 -0500
- Subject: RE: "ls" finds file1 but "ls file1" does not
> -----Original Message-----
> From: cygwin-owner@cygwin.com
> [mailto:cygwin-owner@cygwin.com] On Behalf Of Ross Smith
> Sent: Tuesday, May 10, 2005 4:33 PM
> To: cygwin@cygwin.com
> Subject: Re: "ls" finds file1 but "ls file1" does not
>
> Charles D. Russell wrote:
> > Eric Blake wrote:
> >
> >> mv -v "$f" " ` echo $f | tr A-Z a-z ` "
> >
> > EVIL - you are moving "FOO" to " foo " (Windows strips trailing
> > spaces, but not leading spaces, so it is really moving to " foo").
> > YOU ARE ADDING SPACES to the filename. Fix your script so
> that there
> > are no spaces between "` and `".
> > _____________
> >
> > Thought it was clever of me to make that little ` visible
> to my old eyes.
>
> I always use $(...) instead; it's equivalent to `...` and
> much easier to read.
>
... And suffers from far fewer nesting problems.
--
Gary R. Van Sickle
--
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/