0

I have a complex command bash and my password has a !. I can't just change the password

... command bla bla -p !MYPASSWORD!

throws me an error because it interprets the ! as a command.

How do I escape this? I tried \!MYPASSWORD\! without success

  • using single quotes around your password should do the trick – Aserre Feb 20 '18 at 12:35
  • 3
    [Did you already search and try this? (Click me)](https://stackoverflow.com/questions/27216951/how-to-escape-the-bang-character-in-linux-bash-shell) – CDove Feb 20 '18 at 12:35

1 Answers1

0

Single quotes ('') are used to preserve the literal value of each character enclosed within the quotes.

Paul McLoughlin
  • 2,279
  • 2
  • 18
  • 24