This question already has an answer here:
I'm trying to write a shell script in RHEL which will execute
grub-md5-crypt and the user will type their password.
Now the problem is how can I grab the encrypted md5 hash displayed to the user in the shell script?
I tried to figure this out but command redirection will not work here.
So how can I get the md5 encrypted text in the shell script after the script has executed