Requirement:
To generate a HTML page with CSS integration through shell script - awk
CSS: (mystyles.css)
Shell script command: (generate_html.sh)
awk 'BEGIN {print "<head>"}
{print "<link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" />"}
{print "</head>"}
{print "<table border="1" style=width:40% solid black >"}
END {print "</table>"}
{print "<tr bgcolor=#bfff80>\n<td>"NR, $0"</td>\n</tr>"}' server_list.txt > server_list.html
Exception: Syntax error for '.' of mystyles.css
awk: cmd. line:1:{print "<link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" />"}
awk: cmd. line:1: ^ syntax error
Please help me to resolve this issue.