Need a better find for csh

At /home/me/bin I've got a script called fg. The meat of it is:

find . -name "$1" | xargs grep $2

The intent is to call it as "fg file_pattern search_pattern" and search all matching files. I've added the directory to my path and made the file executable, but when I try to use it I get

fg: no such job

Any help would be greatly appreciated!

Hi James,

fg is a command to restart suspended process or job.

instead, why dont you give execute permissions to the script
(eg. chmod 755 fg)

and then execute the scripts by saying

./fg file_pattern search_pattern

This should work

lemme know
:slight_smile:

or best rename the script (fg) to something else;)

Renaming it worked. But now grep is not giving the path to the fine. Any ideas?