Hi All,
Am trying to print pervious lines of the pattern matched, I was able to print pattern matched and the required data but don't know how to get the pervious line.
ifconfig -a | grep 10.118.67.33 | sed -e 's/^[[: :]]*//' -e 's/[[: :]]*$//' | awk '{FS=" "; print $6}'
output I get is the ipaddress ie,
10.118.67.33
what am looking is how to get the pervious line of this ipaddress... can someone please help me on this.
Many thanks
Ops