Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: Karel Zak <kzak@redhat.com>
To: util-linux@vger.kernel.org
Subject: script(1), scriptreplay(1) and scriptlive(1)
Date: Tue, 8 Oct 2019 14:44:48 +0200
Message-ID: <20191008124448.4ncaccjshxx4vjov@10.255.255.10> (raw)


 Hi all,

 (as promised months ago) we have a new implementation of the script
 stuff now. Details:

 * script(1) is able to record stdout, stdin or both streams

 * new "advanced" timing file format is supported; the file contains
   also information about signals and additional information about the
   session.
 
 * scriptreplay(1) supports all the streams and --summary to print
   overview about the session

 * scriptlive(1) -- new command to re-execute stdin log by shell in
   pseudo-terminal

 * all the tools supports new options --log-in, --log-out, --log-io
   and --log-timing. The original options works too.

 * all changes are backwardly compatible and the new timing file
   format is not enabled by default (you need implicit --logging-format or
   --log-in).

 * yes, script --log-in records all input, including passwords,
   control chars, etc and scriptlive(1) can use it. For example ssh to
   another machine etc.

 Example (see difference between scriptreplay and scriptlive):

 $ script --log-io oi --log-timing tm
 Script started, output log file is 'oi', input log file is 'oi', timing file is 'tm'.
 $ date +'%s'
 1570537455
 $ exit
 Script done.

 $ scriptreplay --summary tm
 START_TIME:  2019-10-08 14:39:49+02:00
       TERM:  xterm-256color
        TTY:  /dev/pts/2
    COLUMNS:  190
      LINES:  50
      SHELL:  /bin/bash
 TIMING_LOG:  tm
 OUTPUT_LOG:  oi
  INPUT_LOG:  oi
   DURATION:  9.229837
  EXIT_CODE:  0

 $ scriptreplay --log-io oi --log-timing tm
 $ date +'%s'
 1570537455
 $ exit


 $ scriptlive --log-io oi --log-timing tm
 >>> scriptlive: Starting your typescript execution by /bin/bash.
 $ date +'%s'
 1570537492
 $ exit 
 >>> scriptlive: done.


    Karel 

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008124448.4ncaccjshxx4vjov@10.255.255.10 \
    --to=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox