-   Linux - General (
-   -   display time in the prompt (

rpb 05-18-2005 09:33 AM

display time in the prompt

the following string displays time in the prompt:

set prompt = "%{\033[29m%}%B[%@]$ "

as follows:


now i want the time in 24 hours format, without any am, pm etc. that is, say


anybody knows how?


bigrigdriver 05-18-2005 05:03 PM

The answer can be found in the Bash Prompt HOWTO. Change %@ to %t (or possibly \t as in the HOWTO) for time in 24 hour format.

All times are GMT -5. The time now is 06:31 AM.