bash/sed/awk/etc remove every other newline
- by carillonator
a bash commands outputs this:
Runtime Name: vmhba2:C0:T3:L14
Group State: active
Runtime Name: vmhba3:C0:T0:L14
Group State: active unoptimized
Runtime Name: vmhba2:C0:T1:L14
Group State: active unoptimized
Runtime Name: vmhba3:C0:T3:L14
Group State: active
Runtime Name: vmhba2:C0:T2:L14
Group State: active
I'd like to pipe it to something to make it look like this:
Runtime Name: vmhba2:C0:T1:L14 Group State: active
Runtime Name: vmhba3:C0:T3:L14 Group State: active unoptimized
Runtime Name: vmhba2:C0:T2:L14 Group State: active
[...]
i.e. remove every other newline
I tried ... |tr "\nGroup" " " but it removed all newlines and ate up some other letters as well. thanks