[PLUG] Putting Date/Time in ksh prompt
Steve Bonds
1s7k8uhcd001 at sneakemail.com
Fri Sep 27 18:51:11 UTC 2002
On Fri, 27 Sep 2002, Richard Langis richard.langis at sun.com wrote:
> Under Solaris 8 I had to change the first ticks to quotes, and then it
> worked just fine:
>
> $ ksh
> $ PS1='`date +%D\ %k:%M\>`'
> `date +%D %k:%M>
> `date +%D %k:%M>`PS1="`date +%D\ %k:%M\>`"
> 09/27/02 11:34>uname -a
> SunOS ht71-mon-2 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-60
That only gets evaluated once in the ancient HP ksh, so it shows the same
date forever. ;-)
-- Steve
More information about the PLUG
mailing list