Bill Hogan wrote in debian.user: > > Hello. > > My prompt strings $PS1 and $PS2 work as expected for non-root users > but not for root. > ... > # define bash prompts > export PS1='\h:[*\u*] \$ ' > export PS2='\h:[*\u*] And? \$ '
You will need to escape the backslash in front of the dollar sign, eg.: PS1='\h:[*\u*]\w \\$ '; export PS1 PS2='\h:[*\u*] And? \\$'; export PS2 I am not sure if this is a bug in the bash or in the documentation ... well probably the latter, since 'real programmers' don't write docs, they read the source ... ;-) Cheers, Dominik (aka Mr.Linux) +----------------------------------------------------------------------+ | 'Mr. Linux' is responsible for the Linux area of the FTP-server of | | Johannes-Gutenberg-Universitaet Mainz, Germany. | +----------------------------------------------------------------------+

