Some commands require sensitive information to be passed on the command line. If we don't want these to show up in the command history, we can use read with the -s flag to store secret values in variables:
read
-s
read -p "PASSWORD: " -s mypass cmd login --creds user:${mypass}
Last updated 4 years ago