Generally “!” is used in shell to invoke a previous event.
(some o/p is displayed)
$ ls -l
(some other o/p is displayed)
(same o/p as ls -l, since this was the previous event for “ls”).
This is the general behaviour of ! in shell.
Now, for one of my works I wanted to send the password via command line and say, my password was something like “password!1”, what would happen ???
$ svn ls <some url> –username name –password password!1
We get something like,
bash: !1: event not found
for obvious reasons that it is trying to invoke the previous event of “1” but I don’t have any.
So, how do we pass the password as “password!1” as such ?
$ svn ls <some url> –username name –password password’!1′
would solve the problem.😉