(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
lets say you need the field after something denoted by a precurser.
precurser = rule:
example...
# echo "1 2 3 4 5 6 rule: 7 8 9 10" | awk '{for (i=1; i<=NF; i++) if ($i=="rule:") print $(i+1)}'
7