/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */


The "if" line needs to start with the if, not the PS1 = .  It looks like 
what your're trying to do is:
if (user = root) then
  set PS1 this way
else
  set PS1 another way
fi
Give it a try.

From:                   "carl engstrom" <[EMAIL PROTECTED]>
To:                     "Ip Masq" <[EMAIL PROTECTED]>
Date sent:              Mon, 27 Mar 2000 09:02:12 -0800
Subject:                [Masq]  bashrc error

> /* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
> 
> 
> Sorry about this, It's pretty lame, but I keep getting the following error
> when I switch users or log in to the system
> 
> bash: syntax error near unexpected token `then'
> bash: /etc/bashrc: line 10: `PS1 = if [ `id -un` = root ]; then'
> 
> I think it's because of some typo in the bashrc file, but Ican't figure out
> where it is...I copied the improvements to bashrc directly from TrinityOS,
> (cut and paste) but I think I have an extra space or something.  any help
> would be appreciated.
> 
> here's the bashrc file
> 
> # /etc/bashrc
> 
> # System wide functions and aliases
> # Environment stuff goes in /etc/profile
> 
> # For some unknown reason bash refuses to inherit
> # PS1 in some circumstances that I can't figure out.
> # Putting PS1 here ensures that it gets loaded every time.
> 
> PS1 = if [ `id -un` = root ]; then
>                             PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
>                         else
>                             PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] '
>                         fi
>  
> Thanks all
> 
> Carl Engstrom
> [EMAIL PROTECTED]
> 
> _______________________________________________
> Masq maillist  -  [EMAIL PROTECTED]
> Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES 
>UNSUBSCRIBIN
G!
> or email to [EMAIL PROTECTED]
> 
> PLEASE read the HOWTO and search the archives before posting.
> You can start your search at http://www.indyramp.com/masq/
> Please keep general linux/unix/pc/internet questions off the list.

_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES 
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to