I ran the following command : ff 'hac-launcher*
[root@foo log]# ff 'hac-launcher*'
./configserver/hac-launcher.log
./odb/hac-launcher.log
.
.
[root@foo log]# type ff
ff is a function
ff ()
{
find . -type f -name $1 -print
}
However, if I try the same command right in the shell's command line, I get different results.
[root@btpvm0913 log]# find . -type f -name 'hac-launcher*' -print
./configserver/hac-launcher.log
./odb/hac-launcher.log.4
./odb/hac-launcher.log.3
./odb/hac-launcher.log.2
./odb/hac-launcher.log.1
./odb/hac-launcher.log
when I run the command right in the shell prompt, I get more files matching whereas, the same filespec/regex when used within the shell function matched fewer files.
How can I ensure that the function call and the inline command execution both bring in the same results ?