python:tests: Correctly escape $ in computer_edit.sh
authorAndreas Schneider <asn@samba.org>
Wed, 8 Feb 2023 20:37:06 +0000 (21:37 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 20 Feb 2023 21:58:32 +0000 (21:58 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15308

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/samba_tool/computer_edit.sh

index 500a00d9a3460bd5998dc682669ee37b45f0e044..1fd4b3f5c7edebffa51dda7ff172afa3871782e2 100755 (executable)
@@ -60,7 +60,7 @@ add_attribute_base64()
 #!/usr/bin/env bash
 computer_ldif="\$1"
 
-grep -v '^$' \$computer_ldif > \${computer_ldif}.tmp
+grep -v '^\$' \$computer_ldif > \${computer_ldif}.tmp
 echo "displayName:: $display_name_b64" >> \${computer_ldif}.tmp
 
 mv \${computer_ldif}.tmp \$computer_ldif
@@ -100,7 +100,7 @@ add_attribute_base64_control()
 #!/usr/bin/env bash
 computer_ldif="\$1"
 
-grep -v '^$' \$computer_ldif > \${computer_ldif}.tmp
+grep -v '^\$' \$computer_ldif > \${computer_ldif}.tmp
 echo "displayName:: $display_name_con_b64" >> \${computer_ldif}.tmp
 
 mv \${computer_ldif}.tmp \$computer_ldif