am new to grep so please take it easy thanks. here is what i have,i have a folder with 1000 .zip files small sizes and i want to search all them using a string and if it matches then extract only the matched string to another folder.
grep "u74" *.zip
ok the code above i i placed 1 zip file in grep folder and searched for u74 and it matches.
how do i make a search.bat and leave all zip in their original folder rather then moving them to grep folder. my grep installation folder
C:\Program Files (x86)\GnuWin32\bin
here are some codes i found but its not working
for i in *.zip; do echo "scanning $i"; grep -oP "u74" <(unzip -l "$i") && echo "Found in $i" || echo "Not Found in $i"; pause
this is exactly what i want but its not working lastly i want to create a folder in same zip path and found and move all found files their.