0
#!/bin/bash
echo "<html><table border=2>"
echo"<tr><th>Letter </th> <th>Total</th> <th>Start</th> <th> End</th></tr>"
for i in $(cat "alphaFile");
do t=`grep -c $i /path/to/my/file`;
b=`grep -c ^$i /path/to/my/file`;
e=`grep -c $i$ /path/to/my/file`;
echo"<tr><td> "$i" </td> <td> "$t" </td> <td> "$b" </td> <td> "$e" </td></tr>"
done
echo"</table></html>"
これは正しいデータを出力しますが、テーブルを作成する代わりにHTMLテーブルのリテラル構文を出力します。htmlテーブルの中にデータを出力するunixスクリプトを作成するには?
出力を実際にHTMLテーブルの内部に入れるために、HTMLをHTMLとして認識させるにはどうすればよいですか?
をUbuntuの上では、(Macの自作をしてみてください)次の操作を行うことができます? –