How do we create html file in shell script?
I tried the below code
echo "<html>"
echo "<head>"
echo "<style type=\"text/css\">"
echo "table{background-color:#DCDCDC}"
echo "thead {color:#708090}"
echo "tbody {color:#191970}"
echo "</style>"
echo "</head>"
echo "<body>"
echo "<table border=\"1\">"
echo "<thead>"
echo "<tr width="100" bgcolor='#C0C0C0'><center><td colspan="3"><font color="#000000"><b>CONSOLIDATED RUNBOOK</b></font></center></td>"
echo "</h4>"
echo "</tr>"
echo "<tr>"
echo "<th><col width="100"><font color="000000">APP NAME</font></th>"
echo "<th><col width="100"><font color="000000">STATUS</font></th>"
echo "<th><col width="100"><font color="000000">STATUS AS ON</font></th>"
echo "</tr>"
>> text.html
I am trying to create html file with the help of shell script. Can you please help>
答案 0 :(得分:0)
{
echo "<html>"
echo "<head>"
echo "<style type=\"text/css\">"
echo "table{background-color:#DCDCDC}"
echo "thead {color:#708090}"
echo "tbody {color:#191970}"
echo "</style>"
echo "</head>"
echo "<body>"
echo "<table border=\"1\">"
echo "<thead>"
echo "<tr width="100" bgcolor='#C0C0C0'><center><td colspan="3"><font color="#000000"><b>CONSOLIDATED RUNBOOK</b></font></center></td>"
echo "</h4>"
echo "</tr>"
echo "<tr>"
echo "<th><col width="100"><font color="000000">APP NAME</font></th>"
echo "<th><col width="100"><font color="000000">STATUS</font></th>"
echo "<th><col width="100"><font color="000000">STATUS AS ON</font></th>"
echo "</tr>"
}>> text.html