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: dealing with spaces in paths

Brian Dessent wrote:
"Larry Hall (Cygwin)" wrote:

homedir=`cygpath -w "$USERPROFILE"`
mount -buf "$homedir" "$HOME"/myh

This is recreated from memory because I don't have access to Cygwin now.
But this is essentially what worked fine for me last night.  Note, the
quote around USERPROFILE is important.

How about simply:

mount -buf "$(cygpath -w "$USERPROFILE")" "$HOME/myh"

I see no reason that can't work as well. But I wasn't attempting to change the style of the script. I was just trying to point out why what the OP had wouldn't work well in the cases he described. If the one-liner you propose above works for the OP's needs, I'd certainly recommend using it. :-)

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746


A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Unsubscribe info:
Problem reports:

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