#!/bin/bash

BNAME=$1
FILE=$2

awk 'BEGIN {w=0} {if($1=="'$BNAME'") {w=1; getline}; if($0=="END") w=0; if(w==1 && $1!="#") print $0}' $FILE

