Text conversion and substitution in files with AWK