[TUHS] sh: cmd | >file

Brantley Coile brantley at coraid.com
Sun Jan 5 18:15:02 AEST 2020


V7 indeed did not have "#" as a comment. Programs use the ":" command for that, and was careful of what was in the comment. The ":" command was called SYSNULL in the source. 
    Later versions of Steve's shell had COMCHAR defined to be a "#" and tested for that symbol in word(), eating up all the characters until it got to a newline. The version of Seventh Edition I used to carry around and embed in things had that mod. My original Seventh did not.


> On Jan 4, 2020, at 9:44 PM, Chet Ramey <chet.ramey at case.edu> wrote:
> 
> On 1/4/20 8:49 PM, Adam Thornton wrote:
>> v7 Bourne shell does not appear to treat '#' as a comment.
> 
> It does, when the shell is not interactive and reading input from a script,
> pipe, or input redirection.
> 
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> 		 ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet at case.edu    http://tiswww.cwru.edu/~chet/



More information about the TUHS mailing list