4 ms·
awk ' { gsub(/[[:blank:]\015]/, ""); printf("%s", $0); }' input | tee output stripping out LF isn't necessary because AWK does it on every record a
by Annatar 10y ago
awk '
{
gsub(/[[:blank:]\015]/, "");
printf("%s", $0);
}' input | tee output
stripping out LF isn't necessary because AWK does it on every record automatically. For even more speed, the code can be translated into ANSI C and compiled with awka[1] using an optimizing C compiler.
[1] http://awka.sourceforge.net/index.html http://awka.sourceforge.net/index.html