Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.1.0.14.2.20020210090253.00aa0608@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 10 Feb 2002 09:14:00 -0800 To: Dmitry Bely , cygwin AT cygwin DOT com From: Randall R Schulz Subject: Re: Multiple backslashes In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Dmitry, Apart from the fact that this question involves Windows native path name syntax (which, by the way, works equally well with forward slashes), this is not Cygwin-specific. There are two levels or rounds of interpretation of your command string. The first is applied by the shell that interpets the command you mentioned. Then the bash invoked by that command interprets the argument to the "-c" option. Each of these rounds of interpretation replaces "\\" with "\". If you use "hard" quotes (apostrophes) then you'll only need two backslashes. If you use forward slashes (and CMD.exe is not going to be involved), then you'll only need quoting to handle spaces and shell globbing metacharacters (i.e., '*', '?' or '[') and syntactically significant characters (e.g., '(' or ';'). Randall Schulz Mountain View, CA USA At 08:45 2002-02-10, Dmitry Bely wrote: >This is probably a FAQ, but can you explain me why > >bash -c "ls c:\\\\" > >requires 4 backslashes? I can understand why 2 BS is needed, but 4 BS IMHO >are too much :-) > >Hope to hear from you soon, >Dmitry -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/