Ewww. awk.
gsub( "\n", "" );
will remove all newlines in $0, if that's what you're looking for. I suppose you could anchor it with $
gsub( /\n$/, "" );
to be more like chomp.
update: Oops! Looks like a is right. I based my assertion on the fact that
% cat foo | awk '{ gsub(/\n$/,""); printf("%s", $0); }'printed out foo as a single line. But take out the gsub and you're okay too. Oh well.
In reply to Re: chomp a newline in awk
by eg
in thread chomp a newline in awk
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |