Hi there,
You haven't said what evidence you have that it doesn't work, so it's hard to tell precisely what the problem is, but I have a guess or two.. The function works fine for me.
Are you running this just in the shell, or as part of a script? In either/both cases, is the working directory the same? If not, then the find command will be looking in a different "." directory.
What about the $1 ? If this is part of a script, then $1 is going to be the positional parameters that were passed to the script itself. Inside the function, it is a different $1 because functions have their own set of positional parameters. So, are you passing the filename to the function, if it's part of a script?
|