shell - How to create a unix script that outputs data inside of an html table? -


#!/bin/bash echo "<html><table border=2>"    echo"<tr><th>letter </th> <th>total</th> <th>start</th> <th> end</th></tr>"  in $(cat "alphafile"); t=`grep -c $i /path/to/my/file`; b=`grep -c ^$i /path/to/my/file`; e=`grep -c $i$ /path/to/my/file`; echo"<tr><td> "$i"  </td> <td> "$t" </td>  <td> "$b" </td> <td> "$e" </td></tr>" done echo"</table></html>" 

this outputs correct data it's outputting literal syntax html table instead of creating table.

how can make html recognized html output inside of html table?

try installing bcat. on ubuntu can following (on mac try homebrew):

sudo apt-get install ruby-bcat 

and doing this:

yourscript.sh | bcat 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -