On Sat, 05 Sep 2015 13:51:22 -0400 (EDT), Philipp Kern wrote: > > This is incorrect if you look at POSIX: > > The compound-list for each list of patterns, with the possible exception > of the last, shall be terminated with ";;". > > http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html > "Case Conditional Construct"
I wasn't looking at POSIX, I was looking at "man bash". bash supports two alternate delimiters to ";;", namely, ";&", and ";;&", but use of these delimiters alters subsequent behavior. I could find nowhere in the documentation for the case command in "man bash" which stated that the delimiter could be eliminated entirely under any conditions. Note that the two alternate delimiters I mentioned are *not* POSIX compliant. > > Well, all of the scripts declare that they are run with bash. It's > clearer to pass in the : built-in and I couldn't find language lawyering > that would allow the empty compound-list here at first glance, but it's > also highly unlikely that bash will change in a fashion that forbids > this. Again, "man bash" states: "A list is a sequence of one or more pipelines ..." Notice that the definition says "one or more pipelines", not "zero or more pipelines". Interestingly enough, "man dash" *does* say "zero or more pipelines". But sysconfig-hardware requires bash. I tried once to convert it to dash, but ran into problems with array assignment statements that I didn't know how to convert, and decided to leave well enough alone. > > To improve correctness it makes sense to apply the patch. I agree. -- .''`. Stephen Powell <[email protected]> : :' : `. `'` `-

