sarwate@uicsl.UUCP (11/25/86)
The man page for eqn states that "All text that is neither between delimiters nor between .EQ and .EN is passed through untouched." However, when I run the following through eqn, .EQ delim $$ .EN .LP $A$ \f2or $B$ or C. it appears that eqn treats the entire line as an equation and creates the long string \*(11 given by \x'0'\f2\s10A\s10\f1 \f2or \x'0'\f2\s10B\s10\f1 or C. In the midst of all the font changes introduced by eqn, the fact that the font was changed to italics just before the word "or" is completely missed. After the $B$ is processed, the font is reset to what it was just after the .LP command, i.e. roman font. Thus, the words "or C." appear in roman font, rather in italic font, as I expected. Is this a bug? or is it a feature? (We have a 4.2bsd system.)
simmons@applga.uucp (Steve Simmons) (06/10/88)
Consider the following two scripts: OK Buggy #!/bin/csh | #!/bin/csh if ( 1 ) then | if ( 0 ) then cat << HERE | cat << HERE else | else HERE | HERE else | else echo There | echo There endif | endif Executing OK is fine -- it echos 'else'. Executing Buggy gives an error HERE: Command not found. It appears that in Buggy it is disregarding the here document *even though it is syntactically correct*. The Bourne and Korn shell equivalents to this script work fine, ie, buggy.sh echos 'There'. Bug in the C shell? Or a wierdness of syntax that I can use to convince people Korn is better? :-) -- +- Steve Simmons UNIX Systems Mgr. Schlumberger CAD/CAM -+ + simmons@applga.uucp ...umix!applga!simmons + +- "Opinions expressed are all my own, etc, etc, etc, etc, etc, etc, etc." -+
ugfailau@sunybcs.UUCP (Fai Lau) (06/15/88)
In article <172@applga.UUCP> simmons@applga.uucp (Steve Simmons) writes: >Consider the following two scripts: > > OK Buggy > #!/bin/csh | #!/bin/csh > if ( 1 ) then | if ( 0 ) then > cat << HERE | cat << HERE > else | else > HERE | HERE > else | else > echo There | echo There > endif | endif >Executing OK is fine -- it echos 'else'. Executing Buggy gives an error > HERE: Command not found. .... >The Bourne and Korn shell equivalents to this script work fine, ie, buggy.sh >echos 'There'. Bug in the C shell? Or a wierdness of syntax that I can >use to convince people Korn is better? :-) Try #!/bin/csh if (0) then cat << HETE; else; HERE else echo There endif I don't particularly like writing shell script for C shell for the very reason that I can never tell what kind of "weirdness" would pop up where I least expected it. Oh, BTW, in my personal opinion, I would say that the Korn shell is "somewhat" better than the C shell. Fai Lau SUNY at Buffalo (The Arctic Wonderland) UU: ..{rutgers,ames}!sunybcs!ugfailau BI: ugfailau@sunybcs INT: ugfailau@joey.cs.buffalo.EDU