Hi All
I have 3 below files , I want to
-rw-r--r-- 1 tes devusers 498422 Oct 29 2019 a.log
-rw-r--r-- 1 tes devusers 498422 Jul 20 00:52 a.log
-rw-r--r-- 1 tes devusers 7820 Jul 24 00:52 b.log
so I want to extract 6 lines from each files and in less then 6 day’s and contained "exception " keyword.
I have tried below command . but not working . Could you please help .
for FILE in `find . -type f -mtime -6 -name \*.log`; do echo grep -i exception -C 2 $FILE > /home/rabindra/logdi/failedlogs.txt; cat $FILE; done