How many times you have felt that there was some simple way to convert bash ansi escape sequences ( colors as well in terminal ) to html equivalent so that you can send the same as html report in email. Here is simple solution. One way is to use ccze if you are using this for logs – colorize your logs and for more generic solution.
dnf install python3-ansi2html.noarch
after this is installed, you can use something like this:
/usr/bin/python3-ansi2html -l -f 12 -i
You can see the help for ansi2html to see what parameters mean and which ones suit you best 🙂
- 2014/10/06 nall – schedule your tasks like a pro
- 2013/10/04 Home grown mail scheduler with bash script and cron
- 2010/06/25 wordpress blog stats monitoring from remote using curl and bash and send it in mail.