Answers for "awk print specific column"

0

awk print specific column

$ awk '{ print $1 }' foo
1
a

$ awk '{ print $2 }' foo
2
b

$ awk '{ print $3 }' foo
3
c

$ awk '{ print $1, $3 }' foo
1 3
a c

$ awk '{ print $3, $1 }' foo
3 1
c a
Posted by: Guest on July-30-2021

Browse Popular Code Answers by Language