#! /bin/sh

# the `^.$' should really be C-_, but some shells can't handle control
# characters correctly

sed -n -e "/^$1/{" -e :foo -e '/^.$/{' -e g -e p -e q -e '}' -e H -e n -e bfoo -e '}' $2 > $3
