Code:
echo "{}"
Another problem you have is that find returns 0 if it finds something or not... which makes it hard to use it in an if statement like that.
The best way to solve this is to have one find statement and use your favorite this: -regex=pattern or -iregex=pattern to find the files
Something like this should work:
Code:
find ${input} -iregex "regex pattern" -exec ...
*.part01.rar|*.rar
but not match things like
*.part0[023456789].rar
Try this,
Code:
find -iregex '.*\.rar' -iregex '.*[^p][^a][^r][^t].?[^023456789]\.rar'
Comment