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:        Wed, 25 Sep 2024 14:17:07 +0700
    From:        Robert Elz <kre%munnari.OZ.AU@localhost>
    Message-ID:  <6599.1727248627%jacaranda.noi.kre.to@localhost>

  | Not a syntax error, an execution error,

Sorry, saw your following message correcting that after I replied.

  | In NetBSD's sh you can actually do
  | 	''() { echo nothing; }

I perhaps could have added, and most probably shouldn't add, that
in NetBSD sh for the purposes desired here, one could do

	""() :

and then execute "" to get an exit status of 0, but that func
definition is likely to just look like line noise to even the
most aware of sh code reading experts.

It is irrelevant whether '' or "" is used, both make an empty word.

kre

kre


Home | Main Index | Thread Index | Old Index