#!/bin/sh # $Id: removeconfigure 66133 2013-04-25 21:59:22Z cxh $ # Remove configure tags so that we may validate the xml awk '{ if ($0 ~ //) { sawConfigure++ } else { if (sawConfigure == 0) { print $0 } } if ($0 ~ /<\/configure>/) { sawConfigure-- } }' $1