blfs book -suggested /etc/profile
s.barnett-cormack at lancaster.ac.uk
Fri Jul 18 08:18:04 PDT 2003
On Fri, 18 Jul 2003, Heinz Kirchmann wrote:
> > PS1="\u@\h \w \$"
> > ...
> > When I echo $PS1 I get
> > \u@\h \w $
> > so somehow it has lost the '\' from '\$'.
> Backslashes followed by a special character in strings enclosed in "
> get eaten during shell evaluation. Their only use is to prevent the
> following character from being special.
> The solution is to use single quotes (')
Or double-escape the $ - \\$ instead. More escapes necessary if it gets
shell evaluated more than once before it gets used.
Software Developer | Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message
More information about the blfs-support