[TUHS] sh: cmd | >file

Dave Horsfall dave at horsfall.org
Mon Jan 6 07:21:11 AEST 2020


On Sat, 4 Jan 2020, Chet Ramey wrote:

>> Which reminds me: which Shell introduced "#" as a true comment?
>
> Define "true comment." The v7 shell had `#' as the comment character, but
> it only worked when in non-interactive shells. I think it was the Sys III
> shell that made it work when the shell was interactive.

Yes, that's what I meant.

> This is, incidentally, why bash has the `interactive_comments' option,
> which I saw in another message. BSD, which most of the GNU developers were
> using at the (pre-POSIX) time, used the v7 shell and didn't have
> interactive comments. When a sufficiently-advanced POSIX draft required
> them, we added it.

I never did catch up with all the options on the various shells; I just
stick with the defaults in general.  Eg:

     aneurin% man bash | wc -l
 	5947

Life's too short...

-- Dave


More information about the TUHS mailing list