Issue: running dsmadmc (7.1.8.6 to Server 8.1.12) from OS cli using characters=$$ in password

Aldini

ADSM.ORG Member
Joined
Jul 5, 2016
Messages
23
Reaction score
1
Points
0
when I run a backup db command scripted using dsmadmc (not interactive shell) it accepts the $ character as a password but it does NOT display it in the activity log for backup db rather it substitutes other characters; for example if it were password=123456789$$ it would print in the actlog 123456789034567 now the set dbrecovery is enabled and the backup db completes without error but substitutes $ character for additonal random numbers; note the script runs the whole "backup db " command in double quotes but the password characters are NOT surrounded by any additional single characters within the backup db command - is that perhaps the problem? Thanks
 
double quotes allow variable substitution in shell/ksh/bash
$$ is a variable - it is the process ID (PID) of the script itself.

Use single quote:
❯ echo dsmadmc -password 1234567890$$
dsmadmc -password 12345678901100
❯ echo dsmadmc -password "1234567890$$"
dsmadmc -password 12345678901100
❯ echo dsmadmc -password '1234567890$$'
dsmadmc -password 1234567890$$

or put password in a variable
❯ PASS='1234567890$$'
❯ echo dsmadmc -password $PASS
dsmadmc -password 1234567890$$
 
Back
Top