From owner-freebsd-questions@freebsd.org Fri Oct 28 14:43:39 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58923C24D02 for ; Fri, 28 Oct 2016 14:43:39 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16253CA9 for ; Fri, 28 Oct 2016 14:43:39 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-yw0-x22f.google.com with SMTP id w3so86604844ywg.1 for ; Fri, 28 Oct 2016 07:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OOUACyxCpmAB3D1mALsffHnb7gZX6u+dtTdjL7G/h7I=; b=uedHCnkhn5wz/iFxwQKuxpkdZ5+M7w4jqXN4Qu8uMILI1ROWSlFWmyv1E80FBPHUzk WLUbpyuGoTyg8qrVqEWmxfpowOTR/804NHDJC1BqwflHRTDzpY1D6B5a4R0IJ/lnLAak 1UyRYFPe4TD+LEOhAOpTObQs1cz3DcLa3JJtHCSR/GWwSp1k99pZQ9cLupMoF/RHwzkg kTCnCnf4PRq4hGWduKNrjPgH8Sp5GS9v1TwaRkwueRZIeUsQd/qX+GMfIjhya6xatp4u 8OcFsDh3tO3xvSVhEDRSWX+T8WfTA2Ni+1i/dHFPLOBEKMfO4tLnzWeQjpTa/J7UVDD3 3RYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OOUACyxCpmAB3D1mALsffHnb7gZX6u+dtTdjL7G/h7I=; b=jmJWj5ljoFcUa4Zl8Q5pZCfUVQ8k0Si6L6Ix4U8uPxku59SmJCtcogONL6eExLt46/ TXxv1077v8BOqwuvUkgAUbvG9g49e1T9tfcEKodo8sayexfJeGv5pqNbLTMR1uxyEmw6 NC6bqj1N8go7cOf/rZf2stpWxzZmOPfC1R8XtOWz0SIMGfwA5NlF47PbFWgqx1BfCvrk ZxFQLoXa7j08AAwilUTTzQQYbMiz9eD3cW26Rw88POI0Ctwk9BdOekXu4dS7dkPsuI5b bKNW+qVw+iiSnX4cyoKTBu3GYxB4/asNiYUSkj9uJ7wrV4pqAbsRoRTF2DO6kj5v52X6 3tAA== X-Gm-Message-State: ABUngvd3iDgF6N+wuTQhM3v6GuLHNMfIVlSLpFxZa7WRKHDCe34L3YTl/RQYFkzlK2bF02C7FfYOzWXNNUqS/w== X-Received: by 10.13.201.3 with SMTP id l3mr11944573ywd.27.1477665818315; Fri, 28 Oct 2016 07:43:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.63.130 with HTTP; Fri, 28 Oct 2016 07:43:17 -0700 (PDT) In-Reply-To: <5a4f0424-cdfa-bd44-9de2-b4860d121584@tundraware.com> References: <516bc76f-f14c-e9a5-a246-2e915a5369ce@qeng-ho.org> <5a4f0424-cdfa-bd44-9de2-b4860d121584@tundraware.com> From: Michael Schuster Date: Fri, 28 Oct 2016 16:43:17 +0200 Message-ID: Subject: Re: Interesting $0 Problem To: Tim Daneliuk Cc: FreeBSD-Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 14:43:39 -0000 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 wrote: > On 10/28/2016 03:34 AM, Arthur Chance wrote: > > > > > > > > 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'