I'm trying to get formatted coloured output from a command line utility presented on a php web page.
I'm using ansi2html.sh from http://www.pixelbeat.org/scripts/ansi2html.sh
It works fine if I run the same command from the command line. I am on OSX.
The command I am running is:
exec ("vendor/bin/phinx migrate -e development | ../../phinx_upgrades/ansi2html.sh 2>&1", $phinx_output, $phinx_return);
The output I get is:
../../phinx_upgrades/ansi2html.sh: line 38: gawk: command not found
So I assume its running the script, but it cant find gawk. I did brew install gawk
but its already installed.
I can run gawk from command line, gawk --version
gives me GNU Awk 4.1.1, API: 1.1
If I ask which gawk
I get /usr/local/bin/gawk
When I echo $PATH
I see /usr/local/bin
as one of my paths.