Re: was wondering
On Wed, 31 Dec 2003 00:23:39 +0100, Mario Vukelic wrote:
>
> if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
> then
> if [ "`id -u`" -eq 0 ]
> then
> PS1='\[\033[01;31m\]\u@\h: \[\033[01;34m\]\w \$
> \[\033[00m\]'
> else
> PS1='\[\033[01;32m\]\u@\h: \[\033[01;34m\]\w \$
> \[\033[00m\]'
> fi
> fi
Alternatively:
...
if [ "`id -u`" -eq 0 ]; then
if [ "$DIMWIT" == "Y" ]; then
PS1='\[\033[01;31m\]Do not type anything stupid.\[\033[01;34m\] # \[\033[00m\]'
else
PS1='\[\033[01;31m\]Yes, Master?\[\033[01;34m\] # \[\033[00m\]'
fi
else
PS1='\[\033[01;32m\]\u@\h: \[\033[01;34m\]\w $ \[\033[00m\]'
fi
--
....................paul
Programming without a hex editor is like watchmaking without a hammer.
Reply to: