I have a list of instances in a server cluster and their matching hostname:
I'm sure there is a simpler command (awk or sed) that would get me:
CLUSTER-A HOST1 HOST2 HOST3 HOST4
CLUSTER-B HOST1 HOST2 HOST3 HOST4
Currently, I write it to an array and process each string- a real pain, so am curious as to a better method.
From my searches (tough to search for something I can't put a name to), I couldn't find much. But I'm sure this is a common issue.