This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

CLI Magic: Use ANSI escape sequences to display a clock in your terminal

Posted by: Anonymous [ip: 134.76.62.65] on January 22, 2008 12:06 PM
I prefer PS1="\A \h:\w > ". (Stupid software HTMLizes the preview?)
That way, the clock is always right at the prompt, and I do not have to use some obscure escape sequences or extra script poking onto my tty which may interfere with terminal programs while they are running.

#

Return to CLI Magic: Use ANSI escape sequences to display a clock in your terminal