Improve a few test canonifiers

This commit is contained in:
Daniel Thayer 2015-09-19 18:08:31 -05:00
parent 8a16145e31
commit a7aa393aef
3 changed files with 21 additions and 19 deletions

View file

@ -4,8 +4,8 @@
# prefix.
if [ $# != 1 ]; then
echo "usage: `basename $0` <field prefix>"
exit 1
echo "usage: `basename $0` <field prefix>"
exit 1
fi
awk -v "PREFIX=$1" '
@ -18,17 +18,15 @@ BEGIN { FS="\t"; OFS="\t"; }
if ( index($i, PREFIX) == 1 )
rem[i-1] = 1;
}
print;
next;
}
/^[^#]/ {
for ( i in rem )
# Mark that it is set, but ignore content.
$i = "+";
}
{
for ( i in rem )
# Mark that it iss set, but ignore content.
$i = "+";
print;
}
'