[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?



On Fri, Dec 13, 2019 at 04:50:18PM -0600, David Wright wrote:
> > PS1='\u@\h $(date +"%d %b %Y %H:%M:%S") :\w\$ '
> 
> Could \D{format} not do that?

Oh, good catch.  I've... never used that before. ;-)  I scanned the
PROMPTING section of the man page too quickly and only saw
the \t \T \@ \A parts.

PS1='\u@\h \D{%d %b %Y %H:%M:%S} :\w\$ '


Reply to: