How can I get awk to print without white space?

2019-06-14 21:19发布

问题:

When I run the following

awk -F\, '{print $2,":",$1}'

It prints

"First : Second"

How can I get

"First:Second"

回答1:

Omit the ,s

awk -F\, '{print $2 ":" $1}'


回答2:

Try this:

awk -F\, '{print $2":"$1}'