Saving colorized output from Bash #
even from programs like testdisk, in which output may span many separate screens:
Text-based output:
- Install aha: $ sudo apt install aha
- $ sudo testdisk | tee >(aha --black>output.html)
- After quiting testdisk, type exit on the command line. Find output.html in the current directory.
Graphic-based output:
- $ sudo apt install imagemagick ttyrec gcc x11-apps
- $ git clone https://github.com/icholy/ttygif.git
- $ cd ttygif
- $ make && sudo make install
- $ ttyrec
- Run desired command(s), e.g., $ sudo testdisk
- Type exit when finished
- Convert ttyrec's output file (ttyrecord by default) to tty.gif in the current directory: $ ttygif ttyrecord
Sources & More
/nix | Mar 05, 2017
Subscribe or visit the archives.