Subject: Shell Bug? (/bin/sh)
To: None <current-users@NetBSD.ORG, lesstif@pain.csrv.uidaho.edu>
From: Randy Terbush <randy@zyzzyva.com>
List: current-users
Date: 01/21/1996 14:59:37
The following snippet of shell seems to have a problem.
(or rather, the shell has a problem....)
This is taken from "configure" in the latest LessTif release.
The first example below is running in /bin/bash, the second
in /bin/sh. The result is the configure script dies thinking
that the X11 Revision is < 5.


if test -s conftest && (./conftest; exit) 2>/dev/null; then
  X11version=
else
  X11version=$?
  echo $X11version
fi

sierra:/usr/users/randy/tmp
=> if test -s conftest && (./conftest; exit) 2>/dev/null 
> then
> echo true
> else
> echo $?
> fi
6
sierra:/usr/users/randy/tmp
=> /bin/sh
$MACHINE:$PWD
=> if test -s conftest && (./conftest; exit) 2>/dev/null 
> then
> true
> else
> echo $?
> fi
0