On 2026-11-26, Lawrence D’Oliveiro <l…@nz.invalid> wrote:
>> Anyway, I took a peek at V6, and found this gem in the find(1) man
>> page:
>>
>> BUGS
>> Syntax should be reconciled with _if_.
>
> How was that supposed to work, exactly? “if” is a shell builtin,
In V6 it wasn't.
https://man.freebsd.org/cgi/man.cgi?query=if&manpath=Unix+6th+Edition
This was before the Bourne shell introduced ALGOL-style flow control
to the shell. The V6 sh(1) had to make do with if(1) and goto(1),
both implemented as external commands. Yes, external goto.
But even in the Bourne world, _if_ just runs a command and acts on
the exit code. test(1) and its alias [ have been implemented as
external commands, and even when they are builtins, they still obey
the syntactic restrictions of an external command.
--
Christian "naddy" Weisgerber nad…@mips.inka.de