delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/03/09/18:33:03.1

From: p DOT dalgaard AT biostat DOT ku DOT dk (Peter Dalgaard BSA)
Subject: Re: groff-1.10
9 Mar 1998 18:33:03 -0800 :
Message-ID: <x24t177r8i.fsf.cygnus.gnu-win32@blueberry.kubism.ku.dk>
References: <506CB4CBB4B4D111AB0900A0C96CA75B02CBA4 AT MISMAIL2>
Mime-Version: 1.0
To: Kevin Schnitzius <kevins AT citrix DOT com>
Cc: "'Morph'" <morph AT Softhome DOT net>, "'Gnu-win32'" <gnu-win32 AT cygnus DOT com>

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 -


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