> some-command --username=jedimastert --password=`cat secret.txt`
This will not work in the way that you suggest. The output of ps will show the result of `cat secret.txt` and thus reveal the password.
Re:Shell Productivity Tips and Tricks
by jedimastert on Sunday April 26, 2020 @02:00PM
(#22988840)
Would it? Poo. That's my bad.
How would backticks help with hiding it from ps?
Re:Shell Productivity Tips and Tricks
by jedimastert on Sunday April 26, 2020 @02:00PM
(#22988843)
I thought that's how it would show up in ps. Apparently I was incorrect. :(
Most CLI programs that need sensetive information as input should either do it interactively (a la sudo), as standard input, or configuration file. If worst comes to very worst, you can put the sensitive info in a text file and use backticks. For example: