Microsoft
Software
Hardware
Network
Question : catch md5sum output
I am writing a script that when run will ask the user to enter a password. The function will be something like:
function func_somethin() {
read -p "Enter User Password: " DBPASS
echo '${DBPASS}' | md5sum | grab MD5 here and place into variable of ${MD5PASS}
}
${MD5PASS} will be placed into a SQL query.
The problem I am having is catching the output and placing it into ${MD5PASS}. When I run it from command line I get this output..
[root@centbox trunk]# echo "password" | md5sum
286755fad04869ca523320acce
0dc6a4 -
But I only need to grab the MD5. Any help would be great, as always I know I can get the best answers here with the level of knowledge amongst all of the experts. Thanks again
Answer : catch md5sum output
So you will have to issue
MD5PASS=$(echo ${DBPASS} | md5sum | tr -d '-')
wmp
Random Solutions
Oracle DB process trigger from different schema
Sendmail 451 4.4.1 reply: read error from Deferred: Connection timed out with
flex profiles 5.0
Limit of recipients into a Distribution List - Exchange 2003
message: Your default context is root:system_r:unconfined_t<wbr />
How to push a ghost image to a newly built raid 1 system?
modify output of del command
Create and deploy a web service in borland builder c++ 10
Impossible to establish an ActiveSync connection wit USB-cable and Windows Mobile 5.0
Replace Harddisk in Software RAID - 2003