When executing a Command Manager script using the following command:
./mstrcmdmgr -n MSTR -u test -p m$tr!23 -f /home/mstr/MicroStrategy/test.scp
-bash: !23: event not found" appears in command line.
Exclamation points are a reserved character by Linux to execute a command from the History List.
So in this example, when passing the exclamation point followed by a number,
!23, the command line is attempting to write into the entry the 23rd command that was executed during the session.
There are three possible ways to resolve this error: (1) adding single quotations around the password, (2) placing the connection parameters to the project source in the Command Manager script, or (3) using encrypted script files.
The fastest solution is to wrap the password in single quotations to force the command line to treat the password as a string.
So using the above example, the solution would be add single quotations around
m$tr!23.
./mstrcmdmgr -n MSTR -u test -p ‘m$tr!23’ -f /home/mstr/MicroStrategy/test.scp
A more secure solution is to place the connection parameters to the project source within the Command Manager script. This is done through the Connect Source outline in Command Manager:
CONNECT SOURCE "<project_source_name>
" USER "<user_name>
" [PASSWORD "<password>
"];

Executing the script file through the command line execution of Command Manager appears like this:
./mstrcmdmgr -connless -f /home/mstr/MicroStrategy/test.scp
The most secure and recommended way to resolve this error is through encrypted script files. These files provide the best security when passing usernames and passwords.
For step-by-step instructions on creating encrypted script files, see KB38275.