Interesting $0 Problem

Alphons van Werven freebsd at
Fri Oct 28 03:05:59 UTC 2016

Tim Daneliuk wrote:

> Old Dog, New Tricks etc.  Thanks for the help :)

Perhaps you already knew, but if you wish to obtain the value of $0 with
the leading dash (if present) stripped, you can use ${0#-} for that, e.g.


A.J. "Fonz" van Werven <freebsd at>
mailsig: Help! I'm a prisoner in a Chinese fortune cookie factory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <>

More information about the freebsd-questions mailing list