Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I swap data between 2 columns?

Status
Not open for further replies.

whatisthis987

IS-IT--Management
Apr 24, 2007
34
US
datafile From:
a b
c d
e f

To:
b a
d c
f e

Please help. Thanks.
 
nevermind. found a solution.

awk '{ print $2, $1 }' filename > new_filename
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top