home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!karell
- From: karell@cs.Helsinki.FI (Esa Karell)
- Newsgroups: comp.unix.questions
- Subject: awk with columns
- Message-ID: <29098@hydra.Helsinki.FI>
- Date: 3 Sep 92 06:30:46 GMT
- Organization: University of Helsinki, Finland
- Lines: 23
-
- Could someone tell me what would be the easisest
- way to accomplish this with awk.
-
- Input:
-
- X Y T P I
- 1 2 3 4 5
- . . . . .
-
- I'd need to swap the values of Y & T so output should look:
-
- X Y T P I
- 1 3 2 4 5
- . . . . .
-
- All the blanks between the columns should remain the same.
- Thx,
-
- Esa
- --
-
- Esa Karell karell@cs.Helsinki.FI
- Tel. +358-0 513 081
-