Changing prompt

I currently have this as my prompt when I log in (shell is sh):
PS1="`hostname ` # "

My question is how do I add the current directory to that prompt? Is there a way?

Thanks.

This has been asked before. Check this link. And please search the forums before asking questions.

Sorry about that. I thought I did search..my bad.
:frowning:

in bourne...how do you set the prompt to display the current directory?

put this in .profile

PS1=`uname -n`:'$PWD'# ; export PS1

This variable $PWD is not set in my bourne shell ...sh ....it has no value.

The PWD variable is only set when I run ksh......

-----------------------------------------------