代码之家  ›  专栏  ›  技术社区  ›  Arpit Rathod

在shell脚本中创建html文件

  •  2
  • Arpit Rathod  · 技术社区  · 6 年前

    如何在shell脚本中创建html文件?

    我尝试了以下代码

        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
    

    我正在尝试使用shell脚本创建html文件。您能帮忙吗>

    1 回复  |  直到 6 年前
        1
  •  1
  •   Arpit Rathod    6 年前
    {
    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