Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-workers: zsh-3.1.4



> "make clean" fails when /bin/sh is bash because $(SUBDIRS) is empty in
> Doc and Etc and maybe elsewhere.  Bash gets a syntax error at
> 
> 	for subdir in ; do
> 
> even though that is prefixed with "if test -n '$(SUBDIRS)'" because it
> apparently wants to parse the entire line before executing any of it.

Yes, this is how sh is supposed to work.  A real, honest-to-god Bourne
shell (SunOS 4.1.4) does not accept an empty list after `in' either.

odin(3)$ sh
${HOST}($SHLVL)\$ for x in ; do echo z ; done
syntax error: `;' unexpected
${HOST}($SHLVL)\$ if test -n ''
> then
> for x in ; do echo z ; done
syntax error: `;' unexpected


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, Case Western Reserve University	Internet: chet@xxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author