Date: Fri, 28 Oct 2016 16:43:17 +0200 From: Michael Schuster <michaelsprivate@gmail.com> To: Tim Daneliuk <tundra@tundraware.com> Cc: FreeBSD-Questions <freebsd-questions@freebsd.org> Subject: Re: Interesting $0 Problem Message-ID: <CADqw_g%2BikaCok--ki6eLqKMgqfZ-jH9NP64_W2RRT8P7zhA11g@mail.gmail.com> In-Reply-To: <5a4f0424-cdfa-bd44-9de2-b4860d121584@tundraware.com> References: <b859f7a3-51d1-06f4-e793-332edd212068@tundraware.com> <516bc76f-f14c-e9a5-a246-2e915a5369ce@qeng-ho.org> <5a4f0424-cdfa-bd44-9de2-b4860d121584@tundraware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
you may want to run different .-scripts depending on whether you're in a login shell (once?) or not (every time) ... On Fri, Oct 28, 2016 at 4:40 PM, Tim Daneliuk <tundra@tundraware.com> wrote: > On 10/28/2016 03:34 AM, Arthur Chance wrote: > <SNIP> > > > > > > > Prepending a dash to a login shell has been standard behaviour since the > > BSD days at least. I think it was in version 6 of the original Bell Labs > > Unix as well, but after three and a half decades my memories for such > > details are a bit hazy. Anyway, it's a standard marker. > > > > > Thanks to all who took the time to answer what turned out to be a really > stupid question on my part. It's odd that I've never run into this > in over 3 decades of working on *NIX ... > > So now, can someone perhaps answer a couple of other really dumb questions: > > When is it useful for a script to know it's running in a login context vs. > a child of the login shell? > > Is there another way to determine if your current shell is the login shell? > > This is more intellectual curiosity than anything ... > > > ------------------------------------------------------------ > ---------------- > Tim Daneliuk tundra@tundraware.com > PGP Key: http://www.tundraware.com/PGP/ > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" > -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_g%2BikaCok--ki6eLqKMgqfZ-jH9NP64_W2RRT8P7zhA11g>