dollar sign in string substitution variable #773
Answered
by
antonmedv
phsaucier
asked this question in
Help needed
-
How can I get this .mjs to substitute correctly the password containing a dollar sign ?
Actual result: $ someDbCommandLine user=someUser password=$'"pwdWithA$"' Expected : $ someDbCommandLine user=someUser password="pwdWithA$" |
Beta Was this translation helpful? Give feedback.
Answered by
antonmedv
Apr 8, 2024
Replies: 2 comments
-
As a workaround for now: ${quote: v => v}`cmd "at" "your own" 'risk'` |
Beta Was this translation helpful? Give feedback.
0 replies
-
Drop quotes in password: const login = 'someUser'
-const pass = '"pwdWithA$"'
+const pass = 'pwdWithA$'
await $`someDbCommandLine user=${login} password=${pass}` Read more about https://google.github.io/zx/quotes |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
antonmedv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop quotes in password:
Read more about https://google.github.io/zx/quotes