Forrest logo
tool overview
On this page you find all important commands for the CLI tool zipgrep. If the command you are looking for is missing please ask our AI.

zipgrep

zipgrep will search files within a ZIP archive for lines matching the given string or pattern. zipgrep is a shell script and requires egrep and unzip to function. Its output is identical to that of egrep.

List of commands for zipgrep:

  • zipgrep:tldr:43a06 zipgrep: Search for lines that do not match a pattern.
    $ zipgrep -v "${search_pattern}" ${filename-zip}
    try on your machine
    explain this command
  • zipgrep:tldr:9b1fb zipgrep: Specify files inside a ZIP archive from search.
    $ zipgrep "${search_pattern}" ${filename-zip} ${file-to-search1} ${file-to-search2}
    try on your machine
    explain this command
  • zipgrep:tldr:ab958 zipgrep: Search for a pattern within a ZIP archive.
    $ zipgrep "${search_pattern}" ${filename-zip}
    try on your machine
    explain this command
  • zipgrep:tldr:bee6b zipgrep: Print file name and line number for each match.
    $ zipgrep -H -n "${search_pattern}" ${filename-zip}
    try on your machine
    explain this command
  • zipgrep:tldr:e7dbf zipgrep: Exclude files inside a ZIP archive from search.
    $ zipgrep "${search_pattern}" ${filename-zip} -x ${file-to-exclude1} ${file-to-exclude2}
    try on your machine
    explain this command
tool overview