This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: batch script execution failing with 255 exit code in cygwin 1.7.28
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Prakash Babu <jprakashbabu31 at gmail dot com>, cygwin at cygwin dot com
- Date: Mon, 17 Feb 2014 09:47:55 +0400
- Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28
- Authentication-results: sourceware.org; auth=none
- References: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA at mail dot gmail dot com> <20140214152344 dot GA1191 at ednor dot casa dot cgf dot cx> <CAHDNAG+P1JS5DYpKYTeV1XPe8Phh8EKr0+KnqkRM_d7xmgLEiw at mail dot gmail dot com> <20140217033532 dot GA2376 at ednor dot casa dot cgf dot cx> <20140217035649 dot GA5507 at ednor dot casa dot cgf dot cx> <CAHDNAGJ29D1wk83XcmDzUg4m71+e6Y6K7A37fPcsWCQ-3OaLtQ at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Prakash Babu!
> thanks Christopher.
> I found the following archive which introduced this fix
> (http://cygwin.com/ml/cygwin-patches/2014-q1/msg00017.html)
> I feel this causes an inconsistent behavior when batch scripts are
> executed using command interpreter(cmd.exe) and cygwin.
> There are some generic batch script we might give to users where some
> might execute using cmd.exe and some using cygwin(especially remotely
> using ssh) and I would be expecting the same behavior in both places.
> Also my existing batch script handles argument a=b in a way where I
> obtain 'a' using %1 and 'b' using %2 and this behavior is broken now.
I would suggest using bash instead of cmd.
Since you are running SSH anyway, you are likely to have bash, too.
As powerful CMD is, it's cumbersome to use, and nowhere near as powerful, as
POSIX shell, not to mention full power of BASH.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 17.02.2014, <09:44>
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