delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/19/09:58:06

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Pb with bash script under cygwin
Date: Mon, 19 Jun 2006 14:57:42 +0100
Message-ID: <003201c693a8$55c32900$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <4935913.post@talk.nabble.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On 19 June 2006 13:51, ydubost wrote:

> So thanks to you idea of executing bash -x, I looked at what's happening and
> the result is that the command executed is :
>       find . -name '"*._SN"' -o -name '"*._sn"' -o -name '"*._lg"' -o -name
> '"*.LG"' -exec rm '{}' '\;' -print
> For a unknown reason cygwin bash when it executes my script put some simple
> quotes ' around my double quotes " and put some single quotes around {} and
> around \;
> 
> Do you have an idea why ?

  It will be something to do with the bash quoting / expansion rules.  I'm not
familiar with all the details of those rules, but "info bash" will have
explanations in it somewhere.  Try using different kinds of quoting.  Also,
some of these rules change according to whether you're executing the script
from a file, or sourcing it using the '.' command, or entering it by hand at a
shell.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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