I use the following commands in a bash script, to output the CPU and disk usage on a computer.
I would like to import this output directly in an HTML file with tables.
How can I get the ouput of these commands to go in a specific table, as shown in the HTML code below?
Code:
echo $[100-$(vmstat|tail -1|awk '{print $15}')]'%'
df -h /dev/sda1 | awk 'NR>1{print $5}'
Code:
<html>
<head>
<title>Report</title>
</head>
<body>
<table>
<tr>
<td></td>
<td>CPU Usage</td>
<td>Disk Usage</td>
</tr>
<tr>
<td>Computer1</td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>