My find looks really simple:
find . -type f
I'm trying to figure out how to exclude certain files or directories, depending on the program argument line.
bash myscript.sh -excl a b c d
a, b, c, d or any next argument of
excl option is a regex referring to certain files or directories I want to exclude.
So if I called the program this way:
bash myscript.sh -excl *.sh somedir
I simply want find to ignore somedir directory and all files with
.sh extension. Is this possible in bash?