Date: Sat, 5 Jan 2002 12:22:39 -0801 From: Jos Backus <josb@cncdsl.com> To: freebsd-hackers@freebsd.org Subject: Re: Bug in /bin/sh's handling of case ... esac? Message-ID: <20020105202301.GH90171@lizzy.bugworks.com> In-Reply-To: <20020105083247.GE90171@lizzy.bugworks.com> References: <20020105083247.GE90171@lizzy.bugworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 05, 2002 at 12:32:25AM -0800, Jos Backus wrote: > case "$foo" in > esac > case word in > [(] pattern1) compound-list;; > [[(] pattern[ | pattern] ... ) compound-list;;] ... > [[(] pattern[ | pattern] ... ) compound-list] > esac Never mind, Alexey V. Neyman pointed out that there are no square brackets around the ``[(] pattern1) compound-list;;'' so at least one pattern needs to be present. zsh and bash are simply more forgivig in this case, presumably because there is no harm in doing so. But since empty case statements are mostly useless the standard behavior that flags them makes more sense. -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020105202301.GH90171>