#!/bin/sh

# Used to print haproxy acls and maps, but only the headers and the
# items that are backed by a file.
#
# "#" is the header
# "[0-9]" is the item ID
# "\(.+\)" is the file name
#
exec awk -r '/^#/ {print $1, $2, $3} /^[0-9]+ \(.+\)/ { print $1, gensub("[()]", "", "g", $2) }'
