Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix question: how to display SID and path in prompt

RE: Unix question: how to display SID and path in prompt

From: <Scott.Shafer_at_dcpds.cpms.osd.mil>
Date: Tue, 27 Aug 2002 07:53:26 -0800
Message-ID: <F001.004C0500.20020827075326@fatcity.com>


Obviously. If you had worked on VMS, why would you want to emulate it? <evil grin>

Scott Shafer
San Antonio, TX
210.581.6217

> -----Original Message-----
> From: Jared.Still_at_radisys.com [SMTP:Jared.Still_at_radisys.com]
> Sent: Monday, August 26, 2002 7:13 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Unix question: how to display SID and path in prompt
>
> Mladen,
>
> Your magnificent intuition and superior powers of reasoning
> have finally failed you.
>
> I've never touched VMS. ;)
>
> Jared
>
>
>
>
>
>
> "Gogala, Mladen" <MGogala_at_oxhp.com>
> Sent by: root_at_fatcity.com
> 08/26/2002 01:28 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
> <ORACLE-L_at_fatcity.com>
> cc:
> Subject: RE: Unix question: how to display SID and path in
> prompt
>
>
> Jared, the "alias cd='go'" line immediately betrays you as a
> former VMS person. Next thing you know and your aliases will
> be like "set_def""
>
> > -----Original Message-----
> > From: Jared.Still_at_radisys.com [mailto:Jared.Still_at_radisys.com]
> > Sent: Monday, August 26, 2002 3:08 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: Unix question: how to display SID and path in prompt
> >
> >
> > > Also be aware that when using backticks in your PS1
> > variable, you are
> > > influencing $? as a result.
> >
> > I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2
> >
> > function go {
> > \cd $1
> > typeset -Z2 _h; typeset -Z2 _m # 2
> > digits, zero padded
> > _hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes
> > _time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m'
> > typeset bold=$(tput bold)
> > typeset shy=$(tput rmso)
> > PS1="[ `pwd` ]"
> > PS1=$PS1`echo
> > "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}-
> > $TTY > "`
> > # need to be able to turn xtitle off when using 'go'
> > if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then
> > # don't do xtitle if NO_CD_TITLE is set or in SCREEN
> > #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle
> > ${MACHINE}:${PWD}
> > :
> > fi
> > }
> >
> > alias cd='go '
> >
> > --------------------
> > 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist
> > rm: cannot remove `this_file_does_not_exist': No such file or
> > directory
> > [ /home/jkstill/tmp ]
> >
> > 10:2-rsysdevdb:dv01:jkstill-3 > echo $?
> > 1
> > [ /home/jkstill/tmp ]
> >
> > 10:2-rsysdevdb:dv01:jkstill-3 > echo $?
> > 0
> > [ /home/jkstill/tmp ]
> >
> > 10:2-rsysdevdb:dv01:jkstill-3 >
> >
> > Jared
> >
> >
> >
> >
> >
> > "Curiel, David" <david.curiel_at_pioneer.com>
> > Sent by: root_at_fatcity.com
> > 08/26/2002 08:23 AM
> > Please respond to ORACLE-L
> >
> >
> > To: Multiple recipients of list ORACLE-L
> > <ORACLE-L_at_fatcity.com>
> > cc:
> > Subject: RE: Unix question: how to display SID
> > and path in prompt
> >
> >
> >
> >
> > Also be aware that when using backticks in your PS1 variable, you are
> > influencing $? as a result.
> >
> > What happens, is that when you run a command (i.e. "rm
> > <some_file_that_doesnt_exist>") and then say "echo $?", you
> > are getting
> > the
> > return code ($?) of your PS1 execution (which is likely to
> > always be 0) -
> > NOT the $? of the "rm" command.
> >
> > David Curiel
> >
> >
> >
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author:
> > INET: Jared.Still_at_radisys.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Gogala, Mladen
> INET: MGogala_at_oxhp.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: Jared.Still_at_radisys.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Scott.Shafer_at_dcpds.cpms.osd.mil

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Aug 27 2002 - 10:53:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US