Please provide script/commands to convert text file to HTML tabular format.
No need of styles and colours, just output and a heading in table is required.
Output file will be send via email and will be seen from outlook.
(script required without using awk).
output file content: (sar command output)
12:00:01 AM CPU %user %nice %system %iowait %steal %idle
12:10:01 AM all 5.99 0.00 3.04 11.76 0.00 79.21
12:20:01 AM all 7.41 0.00 3.05 7.75 0.00 81.79
12:30:01 AM all 12.79 0.00 2.87 6.74 0.00 77.60
12:40:01 AM all 10.77 0.00 2.93 8.70 0.00 77.59
Please use code tags as per forum rules for commands and codes which you are using in post. Following may help you to get a file's output in a html format.
I am taking file named test17 as input file.
Code works fine, But still you have assigned everything as a row , hence the when I look at the output same issue persists.
sample:
12:00:01 AM CPU %user %nice %system %iowait %steal %idle
12:10:01 AM all 5.99 0.00 3.04 11.76 0.00 79.21
12:20:01 AM all 7.41 0.00 3.05 7.75 0.00 81.79
Average 12.79 0.00 2.87 6.74 0.00 77.60
(this is happens when I send the output to email and viewing it through outlook as its convert to calibri format).
In order to display in tabular format I need to use html and sendmail (for oracle queries I go with SET HTML option). But for Unix related output I need to send as a tabular format.