read line from terminal

Krishnaprasad_K at Dell.com Krishnaprasad_K at Dell.com
Thu Apr 19 12:51:28 UTC 2007


Hi,

	You can store the result of the particular command to a variable in ur bash script. May be the below approach may help u.

value=`(echo password ; echo password) | grub-md5-crypt 2> err | grep -iv pass`
echo $value

	This may help ur purpose

Regards,
Krishnaprasad
-----Original Message-----
From: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com] On Behalf Of Koray Sonmez
Sent: Thursday, April 19, 2007 5:20 PM
To: General Red Hat Linux discussion list
Subject: read line from terminal

Hi,

i'm writing a script with bash and in my script i try to read output of  /sbin/grub-md5-crypt command. does anybody know how can i read output or line from terminal.

thanks,

koray





More information about the redhat-list mailing list