Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've added the my cygwin\bin path to Path already but when I type in zgrep in cmd line, it says "zgrep is not recognized as an internal or external command..."

But when I do it within the cygwin cmdline, it works.

Any assistance would be appreciated.

share|improve this question

migrated from stackoverflow.com Nov 25 '11 at 15:57

This question came from our site for professional and enthusiast programmers.

zgrep is a Unix shell script, rather than an executable. Cygwin's bash shell knows how to run it, but Windows' cmd.exe doesn't. Hence you need to tell cmd.exe to invoke it through bash, like so: bash zgrep.

share|improve this answer

If you have bash.exe in your path, you can type bash.exe /path/to/zgrep as zgrep is actually a shell script that needs a shell interpreter.

share|improve this answer

You must log in to answer this question.