Re: current time at bash prompt?

From: Clay Scott <rudeboy@gci.net>
Date: Wed Oct 06 2004 - 13:37:20 AKDT

from my .bashrc (minus some custom coloring to change the prompts color depending on whether i'm logged in via a user, root or remote login):

PS1="(\u@\h)-(\@ \d)-(\W)\n\\$ "

which displays as

(rudeboy@rudy)-(01:38 PM Wed Oct 06)-(rudeboy)
$

~clay

----- Original Message -----
From: "Thomison, Lee" <ThomisonL@ci.anchorage.ak.us>
Date: Wednesday, October 6, 2004 11:59 am
Subject: current time at bash prompt?

> Is there a way to display the time at the prompt? I've tried:
>
> PS1=3D"`hostname`@`date '+%H:%M:%S'$ `
>
> But as you may have guessed, that displayed the time when PS1 was set,
> that is, what time the user logged in.
>
> Thanks!
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Oct 6 13:37:22 2004

This archive was generated by hypermail 2.1.8 : Wed Oct 06 2004 - 13:37:22 AKDT