[SunHELP] root user "prompt" , current dir as prompt in  bourn e shell
    DAUBIGNE Sebastien  - BOR (  SDaubigne@bordeaux-bersol.sema.slb.com ) 
    SDaubigne at bordeaux-bersol.sema.slb.com
       
    Thu Jun 13 12:14:44 CDT 2002
    
    
  
You have to protect $PWD with quotes (or backslash) in order to force the
shell to interpret the variable whenever you change directory.
For instance, include this in the root user .profile (~root/.profile) :
PS1=`hostname`':$PWD >'
---
Sebastien DAUBIGNE
sdaubigne at bordeaux-bersol.sema.slb.com <mailto:sebastien.daubigne at sema.fr>
- (+33)5.57.26.56.36
SchlumbergerSema - Sema Global Services - DW/Pessac
	-----Message d'origine-----
	De:	rmolugurk at yahoo.com [SMTP:rmolugurk at yahoo.com]
	Date:	jeudi 13 juin 2002 17:07
	:	sunhelp at sunhelp.org
	Objet:	[SunHELP] root user "prompt" , current dir as prompt in
bourne shell
	 Hi,
	1.
	  I would like to know where is the setting for root
	user's shell prompt in solaris. I login to the machine
	console as root.
	for non-root users it is in /etc/profile and
	$HOME/.profile as PS1.
	But the root user is not getting the prompt from these
	files.
	2. I use Bourne shell for a user called xx.  Is there
	a way in this shell to get prompt which displays
	"current directory". An example is : If change to a
	dir called test from my home dir /export/home/xx. I
	need the prompt to change to /export/home/xx/test.
	 with my /etc/profile settings as follows, I only get
	my home dir in the prompt for user xx. I didn't have
	any settings in $HOME/.profile for this user xx.
	PWD=`pwd`
	HOST=`hostname`
	PS1="$HOST:$PWD>"
	_______________________________________________
	SunHELP maillist  -  SunHELP at sunhelp.org
	http://www.sunhelp.org/mailman/listinfo/sunhelp
    
    
More information about the SunHELP
mailing list