Article View: comp.unix.shell
Article #421Re: The road not taken
From: Christian Weisgerber
Date: Fri, 27 Nov 2026 00:15
Date: Fri, 27 Nov 2026 00:15
24 lines
1735 bytes
1735 bytes
On 2026-11-26, Lawrence D’Oliveiro <ldo@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 naddy@mips.inka.de
Technical Details
Message-ID:
<slrn11ghiso.klm.naddy@lorvorc.mips.inka.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mailReferences:
<slrn11gh1gh.eig.naddy@lorvorc.mips.inka.de> <11ea75s$1268g$3@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail From: Christian Weisgerber <naddy@mips.inka.de> Newsgroups: comp.unix.shell Subject: Re: The road not taken Date: Fri, 27 Nov 2026 00:15:20 -0000 (UTC) Message-ID: <slrn11ghiso.klm.naddy@lorvorc.mips.inka.de> References: <slrn11gh1gh.eig.naddy@lorvorc.mips.inka.de> <11ea75s$1268g$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 27 Nov 2026 00:15:20 -0000 (UTC) Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1"; logging-data="21175"; mail-complaints-to="usenet@mips.inka.de" User-Agent: slrn/pre1.0.4-9 (FreeBSD)