Hello - i need a little a help with the find command in a bash script.
I want the script to search the pwd and the subfolders for files, given a name pattern as a command line argument.
I have tried using
find . -type f -name "$1"
which works fine when the pattern is plain text.
But if the pattern contains wildcards
( for example: ./findsrc.sh *.c ), it doesn't work.
I have also tried using
find . -type f -name `echo $1 | sed 's/\*/\'\*\'/g'`
but still no luck.
I would greatly appreciate any help.