Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> inserting command output in specific html table
aristosv
post Apr 6 2016, 04:31 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 8
Joined: 27-March 15
Member No.: 18,860



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>
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 14th December 2017 - 01:03 AM