[comp.unix.questions] PS1='${PWD}' and make uppercase?

fordke@ingr.com (Keith Ford x8614) (01/04/90)

I noticed in a recent discussion that using PS1='${PWD}' will cause the
working directory path to become the UNIX prompt.  This works fine, but
is there a way to translate it to upper-case?  I've tried *many* times
using combinations of tr "[a-z]" "[A-Z]", but none have worked.  Chances
are this isn't possible and I just don't know UNIX, but hey, that's okay,
isn't it?  (:  TIA -kef
-- 
_____________________________________________________________________
         >>>>>  ...!uunet!ingr!b23b!dragon!keith  <<<<<
 "Fer cryin' out loud, research physicists need porsches too!" -Opus
 "...the Trees are all kept equal by hatchet, axe, and saw." -Rush

woods@cbnewsc.ATT.COM (Warren D. Swan) (01/07/90)

In article <8229@ingr.com> uunet!ingr!b23b!dragon!keith (Keith Ford) writes:
>
>I noticed in a recent discussion that using PS1='${PWD}' will cause the
>working directory path to become the UNIX prompt.  This works fine, but
>is there a way to translate it to upper-case?

typeset -u PS1
causes your entire PS1 prompt to always be upper case.  Which is good for
the situation you've just asked about, but not so good if you want to
include something else in your PS1 that you don't want to be upper case,
such as PS1="`logname` "'$PWD'.

DON'T DO: typeset -u PWD
since there are some programs that assume that PWD is the valid name of
the current working directory, which it wouldn't then be.