I have this example.text
> cat example.text
10.10.44.11 10.10.44.20 xa1-Y xa2-Y xb1-Y xb2-Y xc1-Y xc2-Y xd1-Y xd2-Y
and I have this command:
srxa_host_list=$(echo example.text | awk '{print $3}' | sed 's/-.*//')
The Ouput:
echo $srxa_host_list
xa1
What I need: Append sr text before "xa1" without creating a new line of code.
echo $srxa_host_list
srxa1