LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ssh to server - PS1 prompt does not complete (https://www.linuxquestions.org/questions/linux-server-73/ssh-to-server-ps1-prompt-does-not-complete-940300/)

Harry Ronis 04-17-2012 01:36 PM

ssh to server - PS1 prompt does not complete
 
in ssh to linux server the PS1 prompt set as

PS1='
${LOGNAME}@${HOST}::$PWD
$ORACLE_SID> '

loses the $ORACLE_SID> part. only goes up to
PS1='
${LOGNAME}@${HOST}::$PWD>'

yet when im on the server and issue . ~/.profile it ALL comes

out. $ORACLE_SID is exported out in a prior script called from this one

MensaWater 04-17-2012 02:01 PM

Are you setting the ORACLE_SID variable before the PS1 variable? That is to say is it possible you're invoking an external environment file to set ORACLE_SID but are doing that AFTER you've already set PS1?

Harry Ronis 04-17-2012 02:07 PM

first thing i looked at. an external environment file called to set ORACLE_SID BEFORE setting PS1. The set of PS1 --- the very last statement in the .profile script. The odd thing is this matters is in AIX this works ok I think on Solaris as well.

Im only hitting this in LINUX.

MensaWater 04-17-2012 02:11 PM

And in the external environment file are you exporting the variable?

In the profile are you invoking with a dot (" . envfile")?

Also you say "profile". Are you running ksh on Linux. The default on most Linux systems is bash and that reads /etc/bashrc, /etc/bash_profile, $HOME/.bashrc and $HOME/.bash_profile rather than just /etc/profile and $HOME/.profile like ksh.

Harry Ronis 04-17-2012 02:17 PM

export ORACLE_SID=asoigprd

. $HOME/.profile_local_first


oracle@uce505:/home/oracle> echo $SHELL
/bin/ksh
oracle@uce505:/home/oracle>

using the korn shell in linux .... that should be fine

Harry Ronis 04-17-2012 02:19 PM

somehow in using ssh something changes question is what?


All times are GMT -5. The time now is 05:33 PM.