Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: mortimer@physics.uq.oz.au (Ian Mortimer)
Subject: Re: Need to display $PWD in prompt using /bin/ksh
Date: 1996/12/09	[thread overview]
Message-ID: <58fmmu$da1$1@nargun.cc.uq.oz.au> (raw)
In-Reply-To: 58adac$a31@news.ecn.bgu.edu


system PRIVILEGED account (root) wrote:
> mortimer@physics.uq.oz.au (Ian Mortimer) wrote:
> >clos@ivory.trentu.ca wrote:
> >
> >
> >> We are using Korn shell (/bin/ksh) and I would like to have the shell display my
> >> present working directory ($PWD) in my command prompt evertime I "cd" to a
> >> different directory.
> >
> >I put this in my .profile:
> >
> >	PS1='${PWD#$HOME/}> '
> >
> >This gives me a prompt showing the current directory in relation
> >to my home directory.
> >
> >Ian

>    It does not work !!!!!!!!

It works for me.  Is HOME defined?  Did you use single quotes?
If you use double quotes you need to escape at least the first $ with a \.
Are you using ksh?  This won't work with other shells.

Ian



      reply	other threads:[~1996-12-09  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-27  5:00 Need to display $PWD in prompt using /bin/ksh clos
1996-11-28  5:00 ` Edgar Hiersekorn
1996-11-28  5:00 ` Michael Livingston
1996-11-28  5:00 ` Raymond N Shwake
1996-11-29  5:00   ` John Meyers, Computing Services
1996-11-28  5:00 ` Mathew E Goldstein
1996-11-28  5:00   ` Roland Kruse
1996-11-28  5:00 ` Harald Finster
1996-12-02  5:00 ` Ian Mortimer
1996-12-07  5:00   ` system PRIVILEGED account
1996-12-09  5:00     ` Ian Mortimer [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox