www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/30/17:11:11

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
From: Stephan Mueller <Stephan DOT Mueller AT microsoft DOT com>
To: Phil Smith <phil AT voltage DOT com>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Sat, 30 Aug 2008 14:08:24 -0700
Subject: RE: Probably stupid make question
Message-ID: <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2D1@DF-MASTIFF-MSG.exchange.corp.microsoft.com>
References: <B870629719727B4BA82A6C06A31C291207429E06EA AT hqmailsvr01 DOT voltage DOT com> <48B706FB DOT 4CAE7693 AT dessent DOT net> <20080828203234 DOT GB17369 AT ednor DOT casa DOT cgf DOT cx> <B870629719727B4BA82A6C06A31C291207429E0893 AT hqmailsvr01 DOT voltage DOT com> <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2B1 AT DF-MASTIFF-MSG DOT exchange DOT corp DOT microsoft DOT com> <20080830195510 DOT GB20923 AT ednor DOT casa DOT cgf DOT cx> <B870629719727B4BA82A6C06A31C291207429E091B AT hqmailsvr01 DOT voltage DOT com>
In-Reply-To: <B870629719727B4BA82A6C06A31C291207429E091B@hqmailsvr01.voltage.com>
Accept-Language: en-US
acceptlanguage: en-US
MIME-Version: 1.0
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m7ULBAM5031101

Phil wrote:
" Will shell scripts get
"
"  -Dsomething=c:/Documents and Settings/whatever
"
" as one argument, or three?

As I hinted in my (off-topic, sorry) other post, you can figure this out for yourself with trivial scripts in the language of interest.  But also, you can note the recurring theme, which is that every tool discussed so far uses spaces to delimit tokens, and requires quotes to make things with spaces in them be considered a single token.  Given that command line splitting (into argv, in a C program) is handled by code common to all programs (more or less), it should be clear which way to place your bets (if you don't want to actually do the trivial tests).

Use Unix shell scripts to avoid the =-sign-is-treated-like-space problem in your Cygwin environment.

Quote arguments with spaces to get them recognized as single arguments.

Avoid directories with spaces in their names if you don't want to do the quoting work.

" cgf wrote:
" "
" " This is all an argument for using Cygwin the way it was supposed to be
" " used - there are no .bat files on UNIX.  Use shell scripts instead.

stephan();



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