#! /usr/bin/gawk -f # Last edited on 2012-02-26 02:12:43 by stolfilocal //{ # Fix spaces before punctuation: $0 = gensub(/[~ ]*([.,;:!?)])/, "\\1", "g", $0); # Fix quotes: $0 = gensub(/[«][ ]*/, "``", "g", $0); $0 = gensub(/[ ]*[»]/, "''", "g", $0); # Currency marks: $0 = gensub(/[$]/, "\\\\$", "g", $0); $0 = gensub(/[¦]/, ":", "g", $0); # Math symbols: $0 = gensub(/[¤]/, "=", "g", $0); print; }