This is the text that I have
Peer Addr 1.1.1.1, Intf Port-Channel0.1, State Up
VRF default, LAddr 1.1.1.1, LD/RD 090/592
Session state is Up and using echo function with 300 ms interval
Detect Time: 8000
Sched Delay: 1*TxInt: 3522100, 2*TxInt: 5, 3*TxInt: 0, GT 3*TxInt: 0
Registered protocols: isis bgp ospf
I want the values after Peer Addr, Intf and Registered protocols
Expected output
1.1.1.1
Port-Channel0.1
isis bgp ospf
This is what I have tried
grep -oP "Peer Addr\s+\K\w+"
I am unable to get the required output. I am new to shell scripting and would be great if someone can help me out on this one. I don't want all the output in a single command. I would like to store these as three different variables