On 01/15/2006 06:28:21 AM, ed wrote:
Another question, how do you associate the rule number to line in pf.conf, without doing the obvious mental exercise, with many rules it can be a chore.
This probably works. I'm not sure about the scrub though. (This is based on the bnf grammer in pf.conf(5).) Please post any improvements back to the list. awk 'BEGIN { c = 1; n = 1 } ; { printf "%5d %s", c, $0; } ; /^[:space:]*((pass)|(block)|(scrub)|((no[:space:]+)scrub))/ { n += 1; } ; ! /\\$/ { c = n; } ' /etc/pf.conf Karl <[EMAIL PROTECTED]> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein