Convert csv to html table using
问题 How can I convert a CSV file into html table? I got a csv file with comma "," and I want this file to convert to Html table. 回答1: OK, you really want it only in bash? Mission accomplished. cat > input.csv a,b,c d,e,f g,h,i echo "<table>" ; while read INPUT ; do echo "<tr><td>${INPUT//,/</td><td>}</td></tr>" ; done < input.csv ; echo "</table>" <table> <tr><td>a</td><td>b</td><td>c</td></tr> <tr><td>d</td><td>e</td><td>f</td></tr> <tr><td>g</td><td>h</td><td>i</td></tr> </table> My first try