Subject: Re: "for" behaviour in /bin/sh
To: None <mouse@Rodents.Montreal.QC.CA>
From: Chet Ramey <chet@nike.ins.cwru.edu>
List: current-users
Date: 07/13/1998 14:08:08
> Gag.  This may work, but only because ${LIST} can't produce zero-length
> strings.  I think the right fix is to shrug at any shells that can't
> handle it and say "fix your sh and it'll work fine".  If you can't do
> that for some reason, go ahead and add a test, but I'd much rather keep
> it out of the NetBSD sources; uglifying our code to make it portable to
> other systems (a) runs against NetBSD tradition (just look at all the
> err() and warn() calls instead of fprintf()) and (b) leads to
> maintenance nightmares after kludges to support a half-dozen different
> systems get grafted on.

POSIX.2 says that an empty list following the `in' is a syntax error.
It may be permissible as an extension.

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

Chet Ramey, Case Western Reserve University	Internet: chet@po.CWRU.Edu