Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.os.minix Subject: Re: shell bug Message-ID: <50765@bcsaic.UUCP> Date: 29 Jun 91 03:29:05 GMT References: <57433@nigel.ee.udel.edu> Organization: Boeing Computer Services AI Center, Seattle Lines: 67 In article <57433@nigel.ee.udel.edu> v882087@si.hhs.nl writes: >In article <9106280203.AA09940@mcsun.EU.net> I write: >> >>[...about a couple suspected bugs in the Minix shell ...] > >If this is a bug, I can only say it is a bug in your V7 documentation. I >have never ever seen a UNIX(like) shell that accepted the for .. do >construction without a semicolon (";") Try this under SunOS 4.1.1: # set a b c # for n do > echo $n > done a b c # Or Ultrix 3.1: $ set a b c $ for n do > echo $n > done a b c $ As you would expect, both of those systems complain about things like: for n in a b c do echo $n done The Seventh Edition Unix Programmer's Manual states that "reserved words like do and done are only recognized following a newline or semicolon." But in the next paragraph, it says: "Another example of the use of the for loop is the create command whose text is for i do >$i; done The command create alpha beta ensures that two empty files alpha and beta exist and are empty. [...] Notice also that a semicolon (or newline) is required before done." I'll leave it as an exercise for the reader to determine which shell has a bug. I've managed to work around the various problems and have now made it all the way through the perl Configure script. The next step is to run all the *.SH scripts manually. (The shell ran into some sort of nesting limit when Configure tried to run them automatically.) Then I get to try to actually *compile* the dang thing! :-) Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!bcsaic!pallen