4
look, inside my.txt file has the following description:
Flags: X - disabled, E - established
0 E name="peer1_cymru" instance=default remote-address=38.xx.xx.xx
remote-as=65555 tcp-md5-key="WUf4f8" nexthop-choice=default
multihop=yes route-reflect=no hold-time=3m ttl=default
in-filter=CYMRU-IN out-filter=CYMRU-OUT address-families=ip,ipv6
update-source=ether1 default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no remote-id=xx.xx.xx.xx
local-address=xx.xx.xx.xx uptime=3h32m11s prefix-count=90668
updates-sent=0 updates-received=90668 withdrawn-sent=0
withdrawn-received=0 remote-hold-time=3h used-hold-time=3m
used-keepalive-time=1m refresh-capability=yes as4-capability=yes
state=established
I need it on the linux terminal using awk which is what I know to only get the prefix-Count=90668 item. It would need the output of the command to be equal: [90668] How to proceed?
Obs: If the output you want includes the brackets in the RAW form of the output, just use this: awk 'match($0, /prefix-Count=(. *)/) { print substr([$0], RSTART, RLENGTH)
– Paz