delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/11/16:40:53

X-Spam-Check-By: sourceware.org
Message-ID: <45A6AEC7.8010402@cygwin.com>
Date: Thu, 11 Jan 2007 16:40:23 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061221 Fedora/1.5.0.9-1.fc4.remi Thunderbird/1.5.0.9 Mnenhy/0.7.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: dealing with spaces in paths
References: <1278386 DOT c5zxZe01gc AT teancum> <45A5AA85 DOT 1040204 AT cygwin DOT com> <3445035 DOT yTEPPvuVV4 AT teancum> <45A65607 DOT 3030404 AT cygwin DOT com> <45A65E18 DOT FB321B08 AT dessent DOT net> <45A6650D DOT 8010107 AT cygwin DOT com> <4e41f5c20701111300o5a3035bg338467bfdc67f400 AT mail DOT gmail DOT com>
In-Reply-To: <4e41f5c20701111300o5a3035bg338467bfdc67f400@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Morgan Gangwere wrote:
> On 1/11/07, Larry Hall (Cygwin) <reply-to-list-only-lh AT cygwin DOT com> wrote:
>> 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                              http://www.rfk.com
>> 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:      http://cygwin.com/ml/#unsubscribe-simple
>> Problem reports:       http://cygwin.com/problems.html
>> Documentation:         http://cygwin.com/docs.html
>> FAQ:                   http://cygwin.com/faq/
>>
>>
> 
> on ly machine, cygpath -w "$USERPROFILE it returs this:
> $cygpath -w "$USERPROFILE
> /cygdrive/c/Documents And Settings/User/
> unescaped.
> 

Why is everyone leaving off the final quote?

All I can say to the above (since you got the intended result despite the
syntax error) is try it without the quotes and you'll see why I made the
suggestion to quote it.

-- 
Larry Hall                              http://www.rfk.com
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:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019