Goal: You want to issue a command (e.g., an export command) that has a password in it. But you do not want anyone looking over your shoulder to see it. You do not want the password to be visible in the history of the shell.
Solution: Type this ‘read -s foobar’
Then press enter. The cursor will go to the next line. Type in the password. The characters will not echo to the screen.
…
Continue reading “How Do You Assign a Password to a Variable In Linux Without Making It Visible?”