[TUHS] sh: cmd | >file

Chet Ramey chet.ramey at case.edu
Sun Jan 5 12:41:59 AEST 2020


On 1/4/20 6:53 PM, Dave Horsfall wrote:
> On Sat, 4 Jan 2020, Chet Ramey wrote:
> 
>> It's elegant until you forget that `:' continues to process redirections.
> 
> So just keep remembering that it's an actual command :-)
> 
> 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.

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.

-- 
``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