Re: manipulating PS1 in sh
- From: Jordan Abel <random@xxxxxxxxxxxxx>
- Date: 28 Oct 2006 03:21:40 GMT
2006-10-27 <1161979585.383055.236660@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
EdStevens wrote:
Trying to set PS1 to reflect the current value of a user environment
variable, when running in sh.
Most of my systems I am running in ksh, and my PS is set as follows:
export PS1=`hostname`'.''$ORACLE_SID> '
so that my prompt always shows the current value of $ORACLE_SID. But
it appears that this syntax doesn't yeild the same results with sh.
There, instead of returning the value of $ORACLE_SID, it simply returns
the literal "$ORACLE_SID".
$ORACLE_SID isn't going to change on you in the middle of a session
unless you eval something that explicitly changes it.
The simple solution is to simply run ksh (my preference) but that
presents certain, uh, political challenges. Is there a simple way of
achieving this same functionality under sh (Solaris 5.9)?
Under what circumstances does this change?
.
- Follow-Ups:
- Re: manipulating PS1 in sh
- From: EdStevens
- Re: manipulating PS1 in sh
- References:
- manipulating PS1 in sh
- From: EdStevens
- manipulating PS1 in sh
- Prev by Date: Re: return values from a function call
- Next by Date: Re: Cisco Engineer, Cambridge, MA
- Previous by thread: manipulating PS1 in sh
- Next by thread: Re: manipulating PS1 in sh
- Index(es):
Relevant Pages
|