unzip a file then further check contents inside it

Dear all
I need to unzip a file then further it has many folders to perform tak inside each folder.
What Task I need to perform I'm able to do it but once I unzip a folder then I'm not able to do cd folder/ into it. I have written following code for it

for i in $( ls | grep Run_20111016 )
do
unzip $i
x=$( cat $i)

cd $x/  // now when I'm doing this then it do cd  /Run_20111016.zip but folder // //is //created via name Run_20111016 can you please help with this
cd  EventType_10008/4197487816/
for i in $( ls  | grep Report_25)
do
 unzip $i
grep 919536868475 *
rm *.csv

done
cd ../../../
rm -r test
#rm t.txt
done

Instead of x=$( cat $i) , try x=$(echo ${i%.*})

--ahamed

---------- Post updated at 08:55 AM ---------- Previous update was at 08:51 AM ----------

And you can refine the code by replacing for i in $( ls | grep Run_20111016 ) with for i in *Run_20111016*

--ahamed

1 Like

thanks a lot i'm able to achieve results
thanks for useful information