Mail Archives: cygwin/1998/03/09/18:33:03.1
Kevin Schnitzius <kevins AT citrix DOT com> writes:
> This continues the old bash == sh debate. When
> groff-1.1X/tmac/makefile.sub is processed by sh, the test -n is
> evaluated before the "for m in..." line is parsed. If you use bash as
> sh, the "for m in..." line is parsed and since an argument is missing,
> make fails.
>
> *sigh*
>
> Bash experts, is there a way to turn this off?
>
A few simple experiments reveal interesting things under Linux:
$ test -n "" && for m in ; do echo a ; done
$ if test -n "" ; then for m in ; do echo a ; done ; fi
$ if test -n "" ; then ; for m in ; do echo a ; done ; fi
bash: syntax error near unexpected token `;'
$ if test -n "" ; then
> for m in x ; do echo a ; done ; fi
$ bash -version
GNU bash, version 1.14.7(1)
$ cat sh.sh
if test -n "" ;\
then\
for m in ;\
do echo a ;\
done;\
fi
$ sh sh.sh
I.e. I can't seem to reproduce the problem.
(Note: Cc'ed to gnu-win32, even though it may not turn up there right
away...)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p DOT dalgaard AT biostat DOT ku DOT dk) FAX: (+45) 35327907
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -