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 -->
  #1 (permalink)  
Old 03-27-2008
rag84dec rag84dec is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 7
diaplaying the grep result

Hi,
My code is like this

Code:
if swlist -a revision 2>/dev/null | grep ABC 2>/dev/null  
then
		
     echo "Found  Above mentioned ABC Version, please remove it first..." 
fi
This is displaying the result to the screen.

i want to first suppress that and for that i wrote the below code
Code:
if swlist -a revision 2>/dev/null | grep ABC 2>/dev/null  > /dev/null
then
	$temp=swlist -a revision 2>/dev/null | grep ABC 2>/dev/null  	
     echo "Found  $temp ABC Version, please remove it first..." 
fi

But it is not working .... can any one help me???

Thanks