Date:        Tue, 24 Sep 2024 23:54:13 +0000 (UTC)
    From:        RVP <r...@sdf.org>
    Message-ID:  <4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org>

  | 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

Reply via email to