#!/bin/sh my_func() { grep 'mystring' $1 } my_func I.dat my_func Q.dat
#!/bin/sh my_func() { grep 'mystring' $1.dat } my_func I my_func Q