Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Oct 2016 20:49:23 -0500
From:      Dutch Ingraham <stoa@gmx.us>
To:        freebsd-questions@freebsd.org
Subject:   Re: Interesting $0 Problem
Message-ID:  <20161028014923.GA11638@fedora24>
In-Reply-To: <b859f7a3-51d1-06f4-e793-332edd212068@tundraware.com>
References:  <b859f7a3-51d1-06f4-e793-332edd212068@tundraware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 27, 2016 at 08:30:40PM -0500, Tim Daneliuk wrote:
> I was fidding with some shell code today and discovered it was breaking
> because $0 was returning "-/usr/local/bin/bash".   Why is there a leading
> dash here?  I've not seen that before.

How are you invoking the expansion, i.e., from a file or the
command-line?  Is this a login shell?

What do you get from the command-line with <echo "$0">?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161028014923.GA11638>