Hello,
I have one weather.txt file:
city weatther
Amsterdam mostly cloudy
Zagreb havy reain
...
I am using this code to convert it ti html and add table:
cat weather.txt |awk 'BEGIN { print "<html>"
print "<table BORDER=2>"}
{ print "<tr>"
print "<td>"
print $1
print "</td>"
print "<td>"
print $2
print "</td>"
print "<td>"
print $3
print "</td>"
print "<td>"
print $4
print "</td>"
print "<td>"
print $5
print "</td>"
print "<td>"
print $6
print "</td>"
print "<td>"
print $7
print "</td>"
print "<td>"
print $8
print "</td>"
print "<tr>"
print "</html>"}
END { print "</table>"
print "</html>"}'
Problem is: if I have space between words it separate it to two colimns or two rows, but I wont to have it in column or row. How can I solve this problem?
Thenks a lot