1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#! /usr/bin/sed -f # # each line of the form ^..<tab>.* contains the code for a country. # /^.. / { h s/^.. \(.*\)/\1./ s/\&/and/g s/ô/@^{o}/g s/é/e/g s/Å/Aa/g x s/^\(..\).*/@item \1/ G p } # # delete the rest # d