Hi I have issue with AWK I need parse some text and I don't know how I can parse recursively.
I have this:
awk '/^tags: /{p=$2} /^[0-9]* /{v=$2} /^$/{print ""p" "v""}'
but that parse only first compliance, I need all match.
input (sensorId can be more than 2):
name: temperature
tags: sensorId=1
time last value
---- ---- -----
1593531518973361030 40.125 40.125
name: temperature
tags: sensorId=2
time last value
---- ---- -----
1593531338178622316 -0.062 -0.062
I'd like output:
1 40.125
2 -0.062
or
sensorId=1 40.125
sensorId=2 -0.062
I use mawk