unix - Searching for a pattern inside a specific filetype from a zip file -
there zip file contains around 50k files of various types.
i interested in below pattern match (looking output 1150000)
amountdue 1150000
i know file contains details of type .abc , there single occurance of .abc file
currently , using :
zipgrep "amountdue" /path/to/sample.zip
it taking considerable time (~ 5mins) perform search.not sure why. possible specify file type search - .abc in case. this:
zipgrep "amountdue" /path/to/sample.zip -file_to_search=.abc
any suggestions on how can implemented/bettered upon great help.
you can add "glob" pattern *.abc end of command. quote avoid expansion
zipgrep "amountdue" /path/to/sample.zip '*.abc'
Comments
Post a Comment