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 06-04-2008
rider29 rider29 is offline
Registered User
  
 

Join Date: May 2008
Posts: 33
how to make this work

hi,

I have been trying to make my script work but could not, tried some of the suggestions from here but I am not getting the correct result.


I have a script that was

Param1 ="$1"
Param2 ="$2"

$Script1 log -t "$param1" "$param2" | grep operation > /dev/null || {
echo "Message" >&2
exit 1 }

exit 0


Now I need to introduce a function in place of grep operation

something like

{
awk ' / dgdg/
..
END {
if(condition)
{
I should exit out like Exit 0
}
else
{
I am unable to pull in the operation
|| { echo "Message" >&2 exit 1}

}

}'
}


Please suggest how we can get

Last edited by rider29; 06-05-2008 at 01:18 PM..