[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: process result code in if

From: Earnie Boyd
Subject: Re: process result code in if
Date: Thu, 6 Jun 2013 07:12:50 -0400

On Thu, Jun 6, 2013 at 5:00 AM, A.P. Horst wrote:
> Also when I just have:
> echo "$var" | grep -Eq '^[0-9]+$'
> echo "$?"
> I am on a win7 x64 machine with MinGW 3.20 and W32API 3.17
> sh --version
> GNU bash, version 3.1.17(1)-release (i686-pc-msys)

How is the var variable set?  If you're using the output of a compiled
program, I'm guessing the issue is CRLF versus just LF.  MSYS will not
remove the CR from the variable.  Add the /mingw/lib/binmode.o to the
compiled program or use _setmode on stdout to make it _O_BINARY.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]