unix - How to custom display prompt in KornShell to show hostname and current directory? -
I am using KornShell (ksh) on Solaris and currently my PS1 env var:
< hostname: / full / path / copy / p1 = "$ {HOSTNAME}: \ $ {PWD} \ $"
and displays the prompt: Current / directory $
However, I would like to display it: Hostname: $ directory
In other words, I only hostname and current Directory name, i.e. tmp
or ~
or public_html
etc. What?
By reading to you
PS1 = "$ {HOSTNAME}: \ $ { PWD ## * /} \ $ "
tested on the default KS on SunOS 5.8
Comments
Post a Comment