Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
* script(1), scriptreplay(1) and scriptlive(1)
@ 2019-10-08 12:44 Karel Zak
  0 siblings, 0 replies; only message in thread
From: Karel Zak @ 2019-10-08 12:44 UTC (permalink / raw)
  To: util-linux


 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 12:44 script(1), scriptreplay(1) and scriptlive(1) Karel Zak

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
	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.git