#! /opt/gnu/bin/gawk -f BEGIN { while(getline < "/home/projects/ameritech/korean/lib/romanizations") { hangul[$1] = $2 } FS = "-" } { for(i=1; i <= NF; i++) { # This is a correction in case we have any /ae/s # (This can probably never happen) gsub(/ae/,"e"); # This is a correction for the flapping rule # that introduces r's. gsub(/r/,"l"); if($i != "" && hangul[$i] == "") { printf("",$i); } else { printf("%s\t%s\t",$i,hangul[$i]); } } printf("\n"); }