Yes, so you are only adding the .* to the last argument in that var, like
grail said.
Also, you find command is not right. You need to use the -name switch. like so:
Code:
find . -name $file1 -mtime +30 -exec rm -v \;
So what you really want to do is this if you want to only target files with a dot and anything after the file name.
Code:
## Remove log files older than 30 days
for file1 in ${LOGFILES}
do
find . -name "${file1}.*" -mtime +30 -exec rm -v \;
done
Or if you want to include all files in the search and remove:
Code:
## Remove log files older than 30 days
find . -mtime +30 -exec rm -v \;