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 -->
  #3 (permalink)  
Old 11-15-2007
user_prady user_prady is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 163
Quote:
Originally Posted by porter View Post
Code:
#!/bin/sh

my_func()
{
        grep 'mystring' $1
}

my_func  I.dat
my_func  Q.dat
or

Code:
#!/bin/sh

my_func()
{
        grep 'mystring' $1.dat
}

my_func  I
my_func  Q

Thank you very much Mr. Porter.. Will try now shortly...

Regards,
user_prady