Session recording

John Abreau jabr at blu.org
Mon Mar 31 17:59:11 EDT 2008


On Mon, March 31, 2008 5:36 pm, VirginSnow at vfemail.net said:

>> ...
>>  export PS1='[ `date` ]'
>> ...
>>
>
> Note: That will probably not do what you intended...  Each time a
> prompt is issued, the same exact prompt will be issued, namely
> "[ Mon Mar 31 17:32:54 UTC 2008]".  "date" will not be rerun
> before each prompt.  To do that, you need to use $PROMPT_COMMAND.


Did you try it first before declaring that it won't work?
I just gave it a try, and it does indeed run the date
command for each prompt.

    [ Mon Mar 31 17:54:54 EDT 2008 ]
    [ Mon Mar 31 17:54:57 EDT 2008 ]
    [ Mon Mar 31 17:55:04 EDT 2008 ]


This is with

    GNU bash, version 3.2.33(1)-release


-- 
John Abreau / Executive Director, Boston Linux & Unix
IM: jabr at jabber.blu.org / abreauj at AIM / abreauj at Yahoo / zusa_it_mgr at Skype
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the gnhlug-discuss mailing list