Kenny Lussier | 1 Apr 2008 03:34
Picon

Re: Session recording

On Mon, Mar 31, 2008 at 7:44 PM,  <VirginSnow@...> wrote:

>  I said it would "probably" not do what was intended.  I was "probably"
>  wrong, as well. :)

Well, now that we have that cleared up..... :-)

>   user <at> localhost$ shopt -s promptvars
>   user <at> localhost$ PS1='[ `date` ] $ '
>   [ Mon Mar 31 19:34:51 EDT 2008 ] $
>   [ Mon Mar 31 19:34:52 EDT 2008 ] $
>   [ Mon Mar 31 19:34:53 EDT 2008 ] $

This method is actually quite elegant in it's simplicity. By tagging
the prompt with a time stamp, it solves a major problem of using
`script`. It gives me a time stamp!! :-) I can add a small snippit to
bash_logout that closes the script log, then echos each line through
logger so that it goes into syslog (and then on to the central logging
system, and into our log analyzer, etc...).

It also has me thinking about different ways of manipulating the
command prompt to add unique identifiers. I might cobble all f this
together and make something useful after all! :-)

Thanks,
Kenny

Gmane