Interesting $0 Problem

Alphons van Werven freebsd at skysmurf.nl
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.
FOO=${0#-}

Fonz

-- 
A.J. "Fonz" van Werven <freebsd at skysmurf.nl>
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: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20161028/1d9e5543/attachment.sig>


More information about the freebsd-questions mailing list