I'm trying to do a for statement within a while read line statement and it's not working. What is wrong with this?
while read line
do
find . -type f -name "*.$line*" -exec gunzip {} \;
for file in */*.$line*;
do grep ERROR "*.$file*" > error.$line.log;
done
find . -type f -name "*.$line*" -exec gzip {} \;
done
I'm getting this error when I execute this
grep: 0652-033 Cannot open *.sub_test/report.1102012359348881.log*.
---------- Post updated at 03:07 PM ---------- Previous update was at 02:42 PM ----------
I just bypassed the for statement and went with another find. command. But I'd still like to know how to make that work.