Post Closed as "duplicate" by Gilles bash of
4 edited tags
| link
3 OP wanted to grab the output from a command that is run, not from the shell itself
| link

How to grab output from shellcommand in shell script

2 added 7 characters in body; edited tags
source | link

I'm trying to write a shell script in rhelRHEL which will execute grub-md5-crypt and the user will type thetheir 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?

I'm trying to write a shell script in rhel which will execute grub-md5-crypt and the user will type the 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 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

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?

1
source | link