title: How to convert terminal output to HTML file format
body: <p>I was using "ansi2html.sh"  here <a href="http://www.pixelbeat.org/scripts/ansi2html.sh" rel="nofollow noreferrer">http://www.pixelbeat.org/scripts/ansi2html.sh</a> to get my job done.</p>
  
  <pre><code>ls -lrt /web/htdocs | tail -12 | ./ansi2html.sh --bg=dark &gt;test.html
  </code></pre>
  
  <p>I was using ansible on local host having Linux OS to run this across multiple hosts which generated the html files on each of the remote hosts and then i would finally pull all the html files from all remote to my local ansible server.</p>
  
  <p>This worked fine for all Linux systems. </p>
  
  <p>However, "ansi2html.sh" has dependency of <code>gawk</code> which is not present on a set of production AiX 6.1 and 7 system. </p>
  
  <p>I get this error:</p>
  
  <pre><code>./ansi2html.sh[38]: gawk:  not found
  </code></pre>
  
  <p>As my AiX is hosting the production application; installing <code>gawk</code> is not recommended.</p>
  
  <p>I dont know if the solution could be to get the output of <code>ls -lrt</code> from all AiX host and then feed that output to "ansi2html.sh" on the local ansible linux server having <code>gawk</code>. Not sure if this will work and if so how ? Note: i wish the output to have the same look and feel as on the putty terminal prompt.</p>
  
  <p>Can I get a solution for AiX so i could use ansible to get html files with the output of <code>ls -lrt</code> from across all AiX hosts ?</p>