'grep' is not recognized as an internal or external command in Windows
In this tutorial, we are going to learn about how to fix the grep is not recognized as an internal or external command, operable program or batch file error in windows operating system.
When we try to search a string from a file using the “grep” command in windows os, we will see the following error is printed in our command line.
grep "car" total.txtOutput:
'grep' is not recognized as an internal or external command,
operable program or batch file.This error is occurred due to the grep command is not available in windows os. It is only available in Linux based operating systems.
To fix the error, replace the grep with the windows findstr command and run it:
Here is an example:
findstr "car" total.txtThis above command, searches for a “car” string in the total.txt file.


