[PLUG] Putting Date/Time in ksh prompt

Richard Langis richard.langis at sun.com
Fri Sep 27 18:36:23 UTC 2002


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

Hope that helps.

-R

Shannon C. Dealy wrote:

> [snip]
> 
> I tested this in ksh under Debian Linux and it worked, further, I used to
> use something similar to this under SCO UNIX and their stock version of
> ksh about ten years ago, what version of UNIX and ksh are you using?
> 
> 
> Shannon C. Dealy      |               DeaTech Research Inc.





More information about the PLUG mailing list