[ubuntu] Sorry newbie question, Varables and output

view story

http://ubuntuforums.org – I would like to run a script that checks to see is Mysql is live. I think something like Code: mysqladmin -umysql ping If the result does match mysqld is alive then I would like it to send an email using mailx. My question is this Why does this only show the last line? and how do I get it to show the full results Code: mysqladmin -umysql ping | $result echo $result Thanks Stefan (Hardware)