diff --git a/highbeam b/highbeam index 98b4be9..1ff4e0e 100755 --- a/highbeam +++ b/highbeam @@ -100,7 +100,7 @@ done } } for (( rIndex=0; rIndex<${#RULES[@]}; rIndex++ )); - do REGEX="$REGEX -e 's/\(${RULES[$r]}\)/${RULES[$(( $rIndex + 1 ))]}\1${Z}/${FLAGS}'" + do REGEX="$REGEX -e 's/\(${RULES[$rIndex]}\)/${RULES[$(( $rIndex + 1 ))]}\1${Z}/${FLAGS}'" rIndex=$(( $rIndex + 1 )) done } || {