X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: From: Jay To: , , Subject: RE: Probably stupid make question (cmd a=b) Date: Sat, 30 Aug 2008 14:47:44 +0000 In-Reply-To: <1220079853.15427.ezmlm@cygwin.com> References: <1220079853 DOT 15427 DOT ezmlm AT cygwin DOT com> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m7UEmW3f031300 continuing somewhat off topic: > Probably stupid make question > 144097 by: Phil > 144106 by: Stephan >>>>> But really, just about anything is better than cmd. <<<< Have you tried quotes? D:\>type 2.cmd @echo 1 is %1 @echo 2 is %2 D:\>.\2.cmd a=b 1 is a 2 is b D:\>.\2.cmd "a=b" 1 is "a=b" 2 is I think tilde is how to strip quotes: echo 1 is %~1 echo 2 is %~2 to echo without quotes echo 1 is "%~1" echo 2 is "%~2" to echo with one set of quotes, no matter if the input was quoted. Though this might go badly if the last character is a blackslash, it might escape the quote. I find anything involving "quoting" to be broken. It is difficult/impossible to know how many rounds of unquoting will occur, and how/by whom. It seems that a large percentage of cmd and bash code is merely fighting to get quoting right. A lot of this stems from the bogus construct of representing an array of strings as one string with spaces delimiting elements. But really, just about anything is better than cmd. I have used cmd a lot and I heartily recommend Perl or Python instead, no matter the application. I do like cmd for interactive use, it is fast, has decent command line editing, history, quickedit (I wish I could triple click for lines), and my favorite feature F8 does completion against command line history. But as a programming language, it is terrible. It is too string based. People complain about the need to install Perl/Python on Windows, that they aren't "built in". Yes, but the alternative, using cmd, is much worse than having to install them. Perl can just be copied around, no need to "install" it. Python I haven't tried that yet. - Jay -- 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/