delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/14/03:35:32

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=i0ZPbIf6qQ7hVYL2
ePEECA/367KclTUmISU9PTyG+D0tzUeUGDdNl/QHcUs5IgCNoB033Vm/bS//0jyR
KXuuECNIvqABSiVsKIFRUN6+eZqkYsAHkLXK6/z80MMWRFP+Pm0Uy0orRlLexe2D
aedOcII3fVS4ylFSCEqkEypA+DM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=9rFTxJa65VPKunXhPy5V2c
sb0ps=; b=MBhJRlhZCIH+NMDCwiSR96SMk1L7JWQvOKBLHxiDJ677ObyX06/D/S
hlCkXn9qpcWNTg5JMdaD+MOv9uwGHsybLwM0nqJHov4LCA+RuYj+PjsZcWerffLX
EBmFrTNGI0rom+0bEP5IgfsPQkuEG4a9xbIr65u2/DaPJUo39EBjo=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL,WEIRD_QUOTING autolearn=no version=3.3.2
X-HELO: smtpback.ht-systems.ru
Date: Fri, 14 Feb 2014 12:20:59 +0400
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <165112012.20140214122059@mtu-net.ru>
To: Prakash Babu <jprakashbabu31 AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28
In-Reply-To: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA@mail.gmail.com>
References: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Prakash Babu!

> I use Cygwin to execute batch scripts on remote windows hosts using ssh.

> The batch script execution started failing with the latest cygwin
> version 1.7.28.

> The exit code thrown is 255 and batch script is not able to process
> the command line arguments.

> When I try to print the command line argument(%1)  its printing both
> the argument name and value.

And how do you invoke the command?...

> This was working fine with Cygwin 1.7.27 and  looks to be regression in 1.7.28


> eg. Batch script (test.bat)

You should REALLY learn the language you are writing your scripts in before
reporting errors to third parties.

> @echo off
> :setArgs
> if ""%1""=="""" goto doneSetArgs

if "%~1" == "" goto :label

References: goto /?, call /?

> set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
> echo %1===
> echo %2===
> shift
> shift
> goto setArgs
> :doneSetArgs


> Cygwin.1.7.27 the output of the script would be
> #./test.bat OS=Win
> OS===
> Win===

> Cygwin.1.7.28 the output of the script is
> #./test.bat OS=Win
> "OS=Win"===
> ===


> Is this a known issue ?
> Where can I download Cygwin 1.7.27  until I find a workaround/fix to
> this issue ?

Fix is simple - don't use bogus semantics when calling batch scripts.
It took me some time to find vague confirmation, that semicolon and equal sign
are valid parameter delimiters, but no direct statement or explanation of
reason behind this retardedness. 


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 14.02.2014, <11:17>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019