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