When passing a password containing shell-special characters such as | (pipe) or ) (parenthesis) via -dxPassword, the script fails with a syntax error.
Fix
Before
regEx="[[:space:]]|." # matches a string with a space character or dot in it.
After
regEx='[[:space:].|();&<>!$`\"]' # matches a string with a special shell character or dot in it.
When passing a password containing shell-special characters such as | (pipe) or ) (parenthesis) via -dxPassword, the script fails with a syntax error.
Fix
Before
regEx="[[:space:]]|." # matches a string with a space character or dot in it.
After
regEx='[[:space:].|();&<>!$`\"]' # matches a string with a special shell character or dot in it.