[Gllug] Why does this script not work?
Wulf Forrester-Barker
wulf.f-b at uhl.nhs.uk
Tue Dec 11 10:53:52 UTC 2001
I'm trying to remember what the aim of the original script was...
If it was just to print the current directory, go up a level and then
print the new directory (leaving you in the new directory), perhaps
there's a better way to get the same information:
PS1="\w $ "
Will set your prompt to:
/home/wulf $ cd ..
/home $
Voila! I normally use "[\t|\W] ", which gives me:
[10:49:59|wulf] (ie. current time and current directory name)
I've saved this as a line in the .bashrc file in my home directory,
followed by:
export PS1
so that it comes up every time I log in.
A full list of control sequences is at:
http://www.linuxdoc.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html
and the whole document:
http://www.linuxdoc.org/HOWTO/Bash-Prompt-HOWTO/
is worth a read if you want to find out more about setting your
prompt.
Wulf
wulf.f-b at uhl.nhs.uk
**********************************************************************
DISCLAIMER:
Any opinions expressed in this email are those of the individual and
not necessarily the Trust. This email and any files transmitted with
it are confidential and intended solely for the use of the individual
or entity to whom they are addressed. Any unauthorised disclosure of
the information contained in this e-mail is strictly prohibited.
The contents of this email may contain software viruses which could
damage your own computer system. Whilst we have taken every
reasonable precaution to minimise this risk, we cannot accept liability
for any damage which you sustain as a result of software viruses.
You should therefore carry out your own virus checks before opening
the attachment.
If you have received this email in error please notify the sender or
postmaster at uhl.nhs.uk. Please then delete this email.
University Hospital Lewisham
Tel: 020 8333 3000
Web: www.uhl.ac.uk
**********************************************************************
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list