examples: Fix shellcheck error in get_next_oid
authorAndreas Schneider <asn@samba.org>
Tue, 22 Feb 2022 16:42:55 +0000 (17:42 +0100)
committerPavel Filipensky <pfilipensky@samba.org>
Wed, 17 Aug 2022 10:08:35 +0000 (10:08 +0000)
examples/LDAP/get_next_oid:6:4: error: Remove spaces around += to assign
(or quote '+=' if literal). [SC2285]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
examples/LDAP/get_next_oid

index f268b47b50dfb8e72b22302f0c6881f835a7c5a3..bc3d6fc43c43a5d30d417493613c5f2013e8791a 100755 (executable)
@@ -3,13 +3,13 @@
 nextattrib=$(cat samba.schema | grep -i attributetype.*\(.*1.3.6.1.4.1.7165. | grep -v '^#' |
        awk '{print $3}' | cut -d. -f 10 | sort -n | tail -1)
 
-( (nextattrib += 1))
+netattrib=$((netattrib + 1))
 
 echo "attributetype ( 1.3.6.1.4.1.7165.2.1.$nextattrib NAME ...."
 
 nextoc=$(cat samba.schema | grep -i objectclass.*\(.*1.3.6.1.4.1.7165. | grep -v '^#' |
        awk '{print $3}' | cut -d. -f 10 | sort -n | tail -1)
 
-( (nextoc += 1))
+nextoc=$((nextoc + 1))
 
 echo "objectclass ( 1.3.6.1.4.1.7165.2.2.$nextoc NAME ...."