Hi. I need to create html table from file which contains data. No awk please In example,
->cat file
num1 num2 num3
23 3 5
2 3 4
(between numbers and words single TAB).
after running mycode i need to get (heading is the first line):
<table> <tr><th>num1</th><th>num2</th><th>num3</th></tr>
<tr><td>23</td><td>3</td><td>5</td></tr>
<tr><td>2</td><td>3</td><td>4</td></tr>
</table>
My code looks like this....but I stopped here...
for i in $*
do
echo "<table>"
while read line
do
for word in $line
do
echo "<tr>"
echo $word
echo "</tr>"
#echo $line
echo "</table>"
done
done<$i
done