You script that needs a password would have the following. Including the carrot
and colon will make sure that the line starts with the username and does not
accidentally pick up more than one line if you have similar usernames. You do
need to make sure that each username is unique in the file.
THIS_PWD=`grep "^user1:" | cut -d":" -f2`
The Following User Says Thank You to gandolf989 For This Useful Post: