CSV to HTML translation: Difference between revisions
Content added Content deleted
(Updated to work with Nim 1.4: added missing types in parameters.) |
(→{{header|Batch File}}: adding bash section) |
||
Line 436: | Line 436: | ||
</tr> |
</tr> |
||
</table></lang> |
</table></lang> |
||
=={{header|bash}}== |
|||
<lang bash>echo "<table>" |
|||
IFS=',' |
|||
while read -a fields |
|||
do |
|||
echo "<tr>" |
|||
for field in "${fields[@]}" |
|||
do echo "<td>$field</td>" |
|||
done |
|||
echo "</tr>" |
|||
done |
|||
echo "</table>"</lang> |
|||
{{out}} |
|||
<pre><table> |
|||
<tr> |
|||
<td>Character</td> |
|||
<td>Speech</td> |
|||
</tr> |
|||
<tr> |
|||
<td>The multitude</td> |
|||
<td>The messiah! Show us the messiah!</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Brians mother</td> |
|||
<td><angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry></td> |
|||
</tr> |
|||
<tr> |
|||
<td>The multitude</td> |
|||
<td>Who are you?</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Brians mother</td> |
|||
<td>I'm his mother; that's who!</td> |
|||
</tr> |
|||
<tr> |
|||
<td>The multitude</td> |
|||
<td>Behold his mother! Behold his mother!</td> |
|||
</tr> |
|||
</table></pre> |
|||
=={{header|Batch File}}== |
=={{header|Batch File}}== |