Oracle Solaris System Administration (MOSC)

MOSC Banner

PS1 modification $PWD is not working in root solaris 10 with /sbin/sh

edited Oct 10, 2012 8:12AM in Oracle Solaris System Administration (MOSC) 8 commentsAnswered ✓
Hi,

Has anyone tried to configure/modify PS1 prompt in solaris 10 for root which is using /sbin/sh? $PWD is not working.. any suggestion except for changing the shell to ksh or bash.

I tried exporting PWD=`pwd` in .profile of root and it only works on the first prompt, when you cd to other directory it will not display the correct pwd.

PRODUCTION  [root@xxxxprod01:/root]
# pwd
/root
PRODUCTION  [root@xxxxprod01:/root]
# cd /app
PRODUCTION  [root@xxxxprod01:/root]
# pwd
/app

 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center