Carlo Marcelo Arenas Belón [off-list ref] writes:
quoted
Unfortunately, it completely breaks the feature. At that point, `$LINENO`
is either unset (e.g. in `dash`) or it contains the number of the line
_containing the `echo`. That is totally useless information at this point,
we want the line number of the caller.
that seems like a bug in dash, which NetBSD sh doesn't have, as LINENO
wouldn't be unset.
I thought you already gave a perfectly well working eval '...' approach.
Was it insufficient?