how do I call zgrep in windows cmd line

3

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.

Tech Shots

Posted 2011-11-24T12:24:56.133

Reputation:

Answers

4

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.

ak2

Posted 2011-11-24T12:24:56.133

Reputation: 3 387

0

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.

amphetamachine

Posted 2011-11-24T12:24:56.133

Reputation: 1 443