LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-17-2012, 01:36 PM   #1
Harry Ronis
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
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
 
Old 04-17-2012, 02:01 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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?
 
Old 04-17-2012, 02:07 PM   #3
Harry Ronis
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-17-2012, 02:11 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 04-17-2012, 02:17 PM   #5
Harry Ronis
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-17-2012, 02:19 PM   #6
Harry Ronis
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
somehow in using ssh something changes question is what?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ksh93 vs. Pdksh88: Custom PS1 prompt not working kristo5747 Linux - Newbie 1 01-19-2011 11:55 AM
Tiny but annoying problem regarding PS1 prompt appearance after tweaking Andramalech Linux - Software 1 04-08-2010 09:30 AM
Prompt not hard returning after PS1 variable change? SlowCoder Linux - Newbie 5 05-01-2007 09:16 PM
Post your BASH prompt [PS1]? introuble General 11 12-27-2006 03:47 PM
$PS1 different in X and prompt codec Slackware 7 06-27-2004 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration