Swap the column values
August25
$ cat swap.txt
a b
c d
e f
g h
i j
k l
$ awk ‘{print $2,$1}’ swap.txt
b a
d c
f e
h g
j i
l k
$ cat swap.txt
a b
c d
e f
g h
i j
k l
$ awk ‘{print $2,$1}’ swap.txt
b a
d c
f e
h g
j i
l k
TheLinuxTips.com >> Place to share your ideas and tricks
Recent Comments