Suppose $2 is my variable. I have tried going from
awk -F, '{print $2 ":"}'
to
awk -F, '{print gsub(/[ ]+$/, "", $2) ":"}'
But it goes from printing something to printing nothing at all.
See Question&Answers more detail:osSuppose $2 is my variable. I have tried going from
awk -F, '{print $2 ":"}'
to
awk -F, '{print gsub(/[ ]+$/, "", $2) ":"}'
But it goes from printing something to printing nothing at all.
See Question&Answers more detail:os