Formatting rows and columns
Hi,i have a simple table some thing like this.
100 user1 101 user1 210 user3 122 user4 120 user3 111 user2 099 user2 How do i format this,such that the data presented is in this form. user1 100 101 user3 210 120 user2 111 099 user4 122 how do i get this formatting using gawk or sed. Thanks |
Have you tried anything? Where are you stuck? I would suggest using (g)awk as it would be trivial.
|
Hi,
Something like this: Code:
#!/bin/bash Code:
$ cat infile EDIT: Did not see grail's reply. He does have a good point, do post what you have tried and what doesn't (seem to) work. |
Code:
#!/bin/bash |
You might try the 'fmt' command also.
|
All times are GMT -5. The time now is 04:16 AM. |