Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #234133

Re: .profile not being src'd at login on uptodate buster

Path csiph.com!1.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!usenet.goja.nl.eu.org!aioe.org!bofh.it!news.nic.it!robomod
From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: .profile not being src'd at login on uptodate buster
Date Mon, 12 Apr 2021 17:30:01 +0200
Message-ID <C36FH-e6-1@gated-at.bofh.it> (permalink)
References <C2qZP-7RB-1@gated-at.bofh.it> <C2qwN-7HS-5@gated-at.bofh.it> <C2rsS-8g4-5@gated-at.bofh.it> <C2J6q-2mz-7@gated-at.bofh.it> <C2Jzr-2vU-3@gated-at.bofh.it> <C36w2-8T-3@gated-at.bofh.it>
X-Mailbox-Line From debian-user-request@lists.debian.org Mon Apr 12 15:27:06 2021
Old-Return-Path <greg@wooledge.org>
X-Amavis-Spam-Status No, score=-6.207 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RDNS_NONE=0.793] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate: -4.6
Mail-Followup-To debian-user@lists.debian.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Mailing-List <debian-user@lists.debian.org> archive/latest/774652
List-ID <debian-user.lists.debian.org>
List-URL <https://lists.debian.org/debian-user/>
List-Archive https://lists.debian.org/msgid-search/YHRmuSolpr9DGjrZ@wooledge.org
Approved robomod@news.nic.it
Lines 19
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Mon, 12 Apr 2021 11:26:49 -0400
X-Original-Message-ID <YHRmuSolpr9DGjrZ@wooledge.org>
X-Original-References <CAD8GWstyK6ojxTYSW8Dd8ma4CbtDEZguMxEidf5ec7KzFTOiFg@mail.gmail.com> <20210410182121.GC13959@axis.corp> <YHH61ahu5TWuRumv@wooledge.org> <20210411141146.GB4614@axis.corp> <YHMKm4+eC1xCBF8N@wooledge.org> <20210412151819.GA3759@axis.corp>
Xref csiph.com linux.debian.user:234133

Show key headers only | View raw


On Mon, Apr 12, 2021 at 10:18:19AM -0500, David Wright wrote:
> I'm not using PS1 to test whether stdout is a terminal, but whether
> the file is running interactively. From man bash:
> 
>   "PS1 is set and $- includes i if bash is interactive, allowing a
>   shell script or a startup file to test this state.

The second half of that sentence is referring to the $- part.  That's
what you're supposed to test to see whether the shell is interactive.

# bash
if [[ $- = *i* ]]; then
  echo "I am an interactive shell"
echo 

# sh
case $- in
  *i*) echo "I am an interactive shell" ;;
esac

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

.profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 14:20 +0200
  Re: .profile not being src'd at login on uptodate buster IL Ka <kazakevichilya@gmail.com> - 2021-04-07 14:30 +0200
    Re: .profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 17:30 +0200
    Re: .profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 17:40 +0200
  Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-07 14:40 +0200
  Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-07 17:10 +0200
  Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 17:20 +0200
    Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-07 17:40 +0200
      Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-07 18:40 +0200
        Re: .profile not being src'd at login on uptodate buster Marco Ippolito <maroloccio@gmail.com> - 2021-04-07 23:20 +0200
          Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 23:50 +0200
            Re: .profile not being src'd at login on uptodate buster Marco Ippolito <maroloccio@gmail.com> - 2021-04-08 14:30 +0200
            Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-10 20:30 +0200
              Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-10 21:00 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-10 21:30 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-11 16:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 16:50 +0200
                Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-11 19:10 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 20:00 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 17:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-12 17:30 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 18:10 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-11 16:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 16:50 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 17:20 +0200
      Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 23:50 +0200
        Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 00:10 +0200
          Re: .profile not being src'd at login on uptodate buster Curt <curty@free.fr> - 2021-04-08 10:20 +0200
            Re: .profile not being src'd at login on uptodate buster Tixy <tixy@yxit.co.uk> - 2021-04-08 12:20 +0200
              Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 13:30 +0200
            Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 13:40 +0200

csiph-web