Hi,

On Wed, 14 Sep 2005 11:15:13 +0200
Charles Trois <[EMAIL PROTECTED]> wrote:

> I am getting confused with profile, bashrc, etc.
> The prompt string I want to use is
> 
> PS1="[EMAIL PROTECTED] \W]\$ "
> 
> [...]
> I thought that /etc/profile should provide the default, but I was 
> obviously wrong. Trying to mend things, I created two files 
> /root/.bash_profile and /root/.bashrc, writing just PS1 in each. Now, 
> logging in as root, the result is
> 
> [EMAIL PROTECTED] root]$
> 
> which is wrong, since "$" appears in place of "#", as though my syntax 
> of PS1 were incorrect, but I don't see that it is.

That's probably due to multi level backslash escaping. Because you
surrounded the prompt string with "", the backslash isn't surviving the
first parser run by bash. You'd need to double it or even triple it
(because the "$" may need escaping on the first level, too).

-hwh
-- 
gentoo-user@gentoo.org mailing list

Reply via email to