The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 09-27-2007
rakeshou rakeshou is offline
Registered User
  
 

Join Date: May 2007
Posts: 75
Cool Pass Shell variables and return the response back to shell

this way I can pass SHELL Variables $prevRelease and $curRelease and also return the result back to SHELL

Code:
prevRelease=r1v07l09ab
currRelease=r1v07l09ac
VALID=`echo "$prevRelease $currRelease" | awk '{ if($1 < $2) print "1"; else print "0" }'`
Thanks ghostdog74 and porter for your responses