www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/10/00:43:34

Date: Mon, 9 Mar 1998 15:49:36 -0800 (PST)
Message-Id: <199803092349.PAA11558@adit.ap.net>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
"Jeff T. Williams" <jeffw AT darwin DOT sfbr DOT org>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: true and false in bash scripts
Cc: djgpp AT delorie DOT com, jeffw AT darwin DOT sfbr DOT org

At 02:10  3/8/1998 +0200, Eli Zaretskii wrote:
>
>On Fri, 6 Mar 1998, Jeff T. Williams wrote:
>
>> #!/djgpp/bin/bash
>
>This is unnecessary: you can type the usual "#!/bin/sh" and it still
>will work (provided you have sh.exe which is a ``symlink'' to
>bash.exe).  The DJGPP port of Bash will look for `sh' along the PATH
>if it is not found in `\bin', and you gain portability in your
>scripts.
>
>> if true ; then
>> echo True
>> else
>> echo False
>> fi
>> 
>> I get the following error:
>> 
>> Exiting due to signal SIGSEGV
>> Page fault at eip=0000a1ba, error=0004
>
>`true' and `false' are not built-in commands in Bash, they are
>external commands.  You need to install Sh-utils (v2gnu/shl112b.zip)
>to have them.

But even so, that's not a good reason for `bash' to crash. We should see

bash: true: No such file or directory




Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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