From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.astro.wisc.edu ([128.104.39.15]) by hawkwind.utcs.toronto.edu with SMTP id <2843>; Tue, 1 Dec 1992 14:28:12 -0500 Received: by oldp.astro.wisc.edu (5.65/DEC-Ultrix/4.3) id AA21580; Tue, 1 Dec 1992 13:28:00 -0600 Message-Id: <9212011928.AA21580@oldp.astro.wisc.edu> To: sam-fans@hawkwind.utcs.toronto.edu Subject: Re: Lines and last lines. Date: Tue, 1 Dec 1992 14:27:59 -0500 From: Alan Watson X-Mts: smtp Several points. Yes, I should have said that the undefined semantics of a final line without a newline went somewhat against sam's philosophy that files are arbitrary streams of TEXT. The default for x is more subtle that I at first supposed, and is useful not just when the final line of the FILE is not terminated by a newline, but also when the final line of the RANGE is a partial line. As to the behaviour of "x /RE/", clearly I misread the somewhat contradictory documentation. The sam paper states on page 6 that "blanks in these examples are to improve readability; sam neither requires nor interprets them." The sam tutorial states on page 11 "if x is followed immediately by a space, the pattern .*\n is assumed." The man page states on page 5 that "if the regular expression and its slashes are omitted /*.\n/ is assumed." Is putting a space between the x and the RE really an omission of the RE? Apparently it is. I don't like white-space to have sematic content (other than to serve as a separator and terminator). While I like the default for x ... I think I might have prefered x /RE/... to be equivalent to x/RE/... but I guess one might argue that the difference is needed to disambiguate x/RE/ ... and x /RE/... although the latter could have been written without ambiguity as x { /RE/... } Can anyone think of a situation where one might want to use "x /RE/..."? Many a time I too have blessed emacs for allowing me to edit binary files. Howevere, all is not lost with sam, due to it's superbly flexible shell escapes. All one needs a filter which takes a binary file and writes out octal, and vice verse; one then uses ",<" and ",>" to read an write binary, whilst editing the octal representation. Alan.