0
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
Well ... It doesn't work that way, I've got this error: grep: unknown option -- ------- Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information. grep: unknown option -- ------- – susik – 2016-06-22T14:20:36.100