PDA

View Full Version : Bash / Awk / Sed Question



pmaconi
November 13th, 2008, 07:30 PM
I have a file of the format:

Name1 01 78
Name1 08 83
Name1 10 92
Name2 02 9
Name2 10 8
Name3 10 2
Name4 01 1

I need to convert it to the form:

Name1 01 78 08 83 10 92
Name2 02 9 10 8
Name3 10 2
Name4 01 1

However, I can only use bash, awk, or sed (or some combination of all 3) to complete the assignment. I'm not really sure where to even start. Any suggestions?

bodhi.zazen
November 13th, 2008, 07:34 PM
If this is an assignment, start by reading the Awk and Sed commands.

This task is fairly straight forward.

Thread closed : These forums are not for assistance with "home work"