The UNIX and Linux Forums  

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 -->
  #2 (permalink)  
Old 11-15-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965

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