/index/match/

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2014-07-28 15:04:48 +02:00
parent 28ab1c92dd
commit fff5e48266
1 changed files with 2 additions and 2 deletions

View File

@ -48,11 +48,11 @@ if [ -f "$file" ]; then
fi
awk -v prefix="^$prefix\\\$" -v suffix="^$suffix\\\$" '
{
if (index(\$0,prefix)) {
if (match(\$0,prefix)) {
triggered=1
}
if (triggered) {
if (index(\$0,suffix)) {
if (match(\$0,suffix)) {
triggered=0
}
} else {