How to escape a "!" present in connection string ?
mreis1 opened this issue · 2 comments
mreis1 commented
./soci_firebird_test "service=localhost:DB_ALIAS user=SYSDBA password=masterkey!2"
will output bash: !2: event not found
because my password has a exclamation mark.
How is it suppose to escape it?
Tried wrapping the value in quotes but had no luck.
./soci_firebird_test "service=localhost:DB_ALIAS user=SYSDBA password=\"masterkey!2\""
Any suggestions?
Thank you
zann1x commented
!
is part of bash's history expansion. Enclosing the whole connection string in single quotes instead of double quotes or turning off history expansion in your shell should fix the problem.
vadz commented
This is a shell question, not a SOCI question, but the answer is to use single quotes around the connection string.