tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fwd: Re: interactive shell detection in shrc
Date: Tue, 24 Sep 2024 23:54:13 +0000 (UTC)
From: RVP <rvp%SDF.ORG@localhost>
Message-ID: <4d7cdca7-fcf4-8985-7c1d-79ef63125e00%SDF.ORG@localhost>
| On Tue, 24 Sep 2024, Steffen Nurpmeso wrote:
I replied to Steffen's (pre-forwarded) message off list, but:
| Yes, this surprised me too. This test is true if $___SHRC is undefined,
(or empty)
| No, that becomes `if ":" ...' $___SHRC is undefined or empty. You need to
| write it that way, else it's a syntax error.
Not a syntax error, an execution error, it would attempt to run the "" command
which cannot possibly exist in the filesystem, so results in "command not found".
In NetBSD's sh you can actually do
''() { echo nothing; }
(where the function body can be anything of course), then the empty-string
command (as distinct from absent command) does exist, and works, but I would
not recommend this to anyone, it isn't likely to work elsewhere.
kre
Home |
Main Index |
Thread Index |
Old Index