I have this two-entry table resulting from a program output:
Variable1 : Value1
Variable2 : Value2
Variable3 : Value3
Variable4 : Value4
Variable5 : Value5
Variable6 : Value6
Variable7 : Value7
I need to extract both the first and the fifth pairr\s, something I do with grep:
$ {program command} | grep -e Variable1 -e Variable5
resulting in this output:
Variable1 : Value1
Variable5 : Value5
The problem here is that I need both pairs on the same line but the grep -e command prints a LF/CR after every -e; I need the four pairs in the same line to make a final sort based on file size. I think I could make this in awk or perl from the same command line but alas I'm still somewhat green with them.
Any ideas? Thanks in advance.
