Jump to content

CSV to HTML translation: Difference between revisions

→‎{{header|Batch File}}: adding bash section
(Updated to work with Nim 1.4: added missing types in parameters.)
(→‎{{header|Batch File}}: adding bash section)
Line 436:
</tr>
</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}}==
1,934

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.