$ echo “a b” | awk ‘{print $0; $1=”1″; print $0}’
a b
1 b
I would like to receive formatted output like this:
a b
1 b
Is there easy way to do that (without IFS,OFS changes)?
I am changing columns in big table and afterwards it looks ugly.
I don’t want to reformat each column.
Thanks.
Probably your best bet is to post-process the output. Perhaps something as simple as:
will work. (Unless by “I don’t want to format each column” means “I don’t want to reformat each row”, eg “I don’t want to post process”. In which case I would ask, “Why not?”)