X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: mwoehlke <mwoehlke@tibco.com>
Subject:  Re: window command in bash
Date:  Tue, 18 Jul 2006 15:35:29 -0500
Lines: 31
Message-ID: <e9jgmh$d5q$1@sea.gmane.org>
References:  <Pine.GSO.4.63.0607181258540.26459@access1.cims.nyu.edu> <31DDB7BE4BF41D4888D41709C476B65704168D1A@NIHCESMLBX5.nih.gov>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 1.5.0.4 (X11/20060516)
In-Reply-To: <31DDB7BE4BF41D4888D41709C476B65704168D1A@NIHCESMLBX5.nih.gov>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Igor Peshansky wrote:
>> On Tue, 18 Jul 2006, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>>> Did you quote the path or escape the backslashes to protect the
>>> backslashes from the shell interpreting them as escape characters?
>>> 	E.g., AgBackup.exe /notext 'c:\Alligate\agbackupfiles'
>>> or
>>> 	AgBackup.exe /notext "c:\Alligate\agbackupfiles"
>> A minor correction: you still need to escape the backslashes when
>> using double quotes, so the right way is 
>>
>> 	AgBackup.exe /notext "c:\\Alligate\\agbackupfiles"
> 
> Here's what bash does:
> 
> /c> echo  "c:\Alligate\agbackupfiles"
> c:\Alligate\agbackupfiles
> 
> Maybe if one has a variable following the backslash:
> 
> /c> echo "xyz\$USER"
> xyz$USER
> /c> echo "xyz\\$USER"
> xyz\BBuchbinder

I think the point is that "\\" is ALWAYS safe, whereas "\?" (where "?" 
is some character) may not be.

-- 
Matthew
Lions and tigers and ...penguins? We're being invaded!


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

