I have a dataset as such:Name:      Jim BeanVice:      DiceID:        AFDSDFDSFDSFASFALoginTime: 12343314Name:      Bob DylonVice:      TrumpetsID:        AFD232SFDSFASFALoginTime: 12343314Name:      Mary JaneVice:      GamblingID:        EWDSFDSFASFALoginTime: 12343314.....I need to arrange this into a columnar format. My first thought is to use awk. But I'm a bit stuck.The labels will always appear in the same order, also it will always show the same number of label/value pairs in each group (headers aren't important). My question is: How would I do this? I've seen hints that the command rs may be able to do something like that, but its not standard on all systems.
AWK : Converting Row Formated Data into Columnar
text processing;awk;data
You should post desired output with your question. My guess was this:$ awk '{ if($2) printf(%s , $2); else print ; }' < datasetJim Dice AFDSDFDSFDSFASFA 12343314 Bob Trumpets AFD232SFDSFASFA 12343314 Mary Gambling EWDSFDSFASFA 12343314Note that this is an awfully stupid method, it does not validate anything at all. If your input looks any different from what you posted it will probably break.