PS1 modification $PWD is not working in root solaris 10 with /sbin/sh
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