gfsh command is not accepting password with special character '!' from gfsh console

183 views Asked by At

Not able to connect to auth enabled gemfire cluster using gfsh console when we have password with special character. Using the below command for login into gemfire cluster

gfsh -e "connect --locator=localhost[13120]  --user=$(getProperty 'AUTH_USER') --password=$(getProperty 'AUTH_PASSWORD')"

Where the password is something like 'P*Q8!j6c'. I tried escaping '!' with '\!'. But didn't work.When I manually open gfsh console and provide it manually instead from shell script, it's working fine for me.

It would be a great help if you can help me in passing the password parameter.

1

There are 1 answers

0
Jens D On

You should be able to do something like this:

eval '$GFSH -e "connect --user=foo --password=S*A8!j6c"'

Which avoids the shell trying to expand history. If you're in bash you can also disable history expansion with set +H.