The subject of “is used for the shell’s error messages” is “$0
”, not “_
, -
, --
or the empty string”. The value given to $0
is used for error messages; so you shouldn’t specify a meaningless value for $0
, otherwise you’ll end up with weird error messages. It might make more sense as
Note that the second
sh
above goes into the inline script's$0
. You should use something relevant there (likesh
orfind-sh
), not things like_
,-
,--
or the empty string, as the value in$0
is used for the shell's error messages:
inline-sh
does work in the example: it’s used in the error message, which is the whole point of the example.