os/shell/ ScriptCommand


$ script filename.txt

$ mp 2, st

results in the following (mp is my mpd/mpc helper script).

Script started on 2023-01-27 20:09:24+00:00 [TERM="xterm-256color" TTY="/dev/cons2" COLUMNS="120" LINES="30"]
^[[?2004h^[];t470s1:~

Fri Jan 27 20:09:24 ^[[01;32mjohn@t470s1^[[00m:^[[01;34m~^[[00m

^[[01;34m~^[[00m $ mp 2, st
^[[?2004l
> mpc status
John 00 Fleming - John 00 Fleming presents JOOF Radio 005
[playing] #5/37  57:47/120:07 (48%)
volume: 60%   repeat: off   random: off   single: off   consume: off
^[[?2004h^[];t470s1:~

Fri Jan 27 20:09:31 ^[[01;32mjohn@t470s1^[[00m:^[[01;34m~^[[00m

^[[01;34m~^[[00m $ exit
^[[?2004l
exit

Script done on 2023-01-27 20:09:33+00:00 [COMMAND_EXIT_CODE="0"]