Python Forum

Full Version: windows grep messed up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have long used windows (GNU) grep without incident ... until about 6 months ago
now when I use a command like:
grep -ri --include='*.py' 'messagebox' .
I immediately get an idle window with a copy of grep.py in it

Any clues on how to stop this most annoying behavior?

Same in cmder or cmd

I added an environment variable to no avail
cmder comes with build in grep.
λ grep --version                                                                            
grep (GNU grep) 2.26                                                                        
Copyright (C) 2016 Free Software Foundation, Inc.                                           
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.              
This is free software: you are free to change and redistribute it.                          
There is NO WARRANTY, to the extent permitted by law.                                       
                                                                                           
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
I am having the same issue no matter where I run grep.
Is there something wrong with my syntax?

So I tried grep --version (from cmder)
I immediately get the idle window.
I need to examine all of my paths more closely, this is an odd one.

I also tried:
λ which grep

/c/Program Files (x86)/GnuWin32/bin/grep
which is obviously taking precedence over cmder's grep
GnuWin32 add automatically to Environment Variables(Path)
You can remove it there and restart.
If grep from cmder still start IDLE,you most look at File Associations,
and see if grep is pointing to something.
Thanks -- MS-pain