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 grub-md5-crypt
?
2>&1
for getting result from stderr – kimbaudi Jul 17 '19 at 08:26