This 42 project aims to recode the script
command line utility to learn more about pty/tty.
This ft_script implements all options of the original
a
Append the output to file or typescript, retaining the prior contentsd
When playing back a session with the -p flag, do not sleep between recordsF
Immediately flush output after each writek
Log keys sent to the program as well as outputp
Play back a session recorded with the -r flag in real timeq
Run in quiet mode, omit the start, stop and command status messagesr
Record a session with input, output, and timestampingt
Specify the interval at which the script output file will be flushed to disk (in seconds)
The -r
, -d
and -p
flags are compatible with the origin script
utility. You can record a session with script
and play it with ft_script
, or vice-versa.
It also adds the SCRIPT
env var to the sub-shell (the value is file or typescript)
To build, just issue :
$ make
To clean :
$ make clean
or, if you want to clean the built library as well :
$ make fclean