blob: 4a8011a7d52b8774996a1845f5d536a21cbd7ee3 [file] [log] [blame]
#!/bin/sh
# Extracts the ISO_639-2 file from http://www.loc.gov/standards/iso639-2/code_list.html
# Usage: iso-639-2-table.sh < code_list.html
LC_ALL=C
export LC_ALL
tr '\012' ' ' |
sed -e 's,<tr ,\
<tr ,g' |
sed -n -e 's,^<tr [^>]*>[^<>]*<td[^>]*>\([^<>]*\)</td>[^<>]*<td>&nbsp;</td>[^<>]*<td>\([^<>]*\)</td>.*$,\1 \2,p' |
iconv -f ISO-8859-1 -t UTF-8