[Linux-disciples] Including the results of a program in a prompt

Stephen R Laniel steve at laniels.org
Mon Nov 22 10:22:25 EST 2004


I use this as my bash prompt, starting yesterday:

PS1="(`date +'%H:%M:%S'`) \u@\h:\w\$ "

This uses the string 'hours:minutes:seconds' as part of the
prompt. Only it's not refreshing the time whenever a new
prompt is displayed on the screen. Any idea why that would
be? Does the backtick only go through when .bashrc is
sourced? And if so, is there any way to get it to do what I
want?

-- 
``[My 3-year-old, Zoe] thought for a moment, and then said,
  `you think George Bush is too stupid to have so much
  wesponsibility?' Yes, child. Exactly that. Plus malice.''
 -http://crookedtimber.org/archives/002857.html



More information about the Linux-disciples mailing list