Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-10-2008
aspect_p aspect_p is offline
Registered User
 

Join Date: Mar 2008
Posts: 13
Shell script getting input from output

I have a program that can be run in terminal, when its run it either returns SSH OK or CRITICAL, how do i use the output in my script?

good
./check_sh myserver
SSH OK

bad
./check_sh myserver
CRITICAL

I want to store it in a variable btw, SSH OK will give the variable $SSH=1 and if its critical $SSH=0
Sponsored Links