Hide/encrypt password in bash file to stop accidentally seeing it
问题 Sorry if this has been asked before, I did check but couldn't find anything... Is there a function in Unix to encrypt and decrypt a password in a batch file so that I can pipe it into some other commands in a bash file? I realise that doing this provides no real security, it is more to stop someone accidentally seeing the password if they are looking at the script over my shoulder :) I'm running on Red Hat 5.3. I have a script which does something similar to this: serverControl.sh -u admin -p