I am using 'find' and 'grep' cygwin commands in order to locate files based on some pattern. I am doing this:
find . -iname '*.zip' -print -exec unzip -l {} \; 2> error.txt |grep -i vbs
It works fine and I have file name with 'vbs' in file name. BUT now I need to do similar but I need to find the file name based on the content of it e.g. 'vbs' is not part of the file name but part of the file content. How it could be modified? Maybe something like :
find . -iname '*.zip' -print -exec unzip -l {} \; 2> error.txt | xargs ??? Could someone advice? Thanks