Python Forum
windows grep messed up - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: windows grep messed up (/thread-2585.html)



windows grep messed up - Larz60+ - Mar-26-2017

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


RE: windows grep messed up - snippsat - Mar-26-2017

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>.



RE: windows grep messed up - Larz60+ - Mar-27-2017

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


RE: windows grep messed up - snippsat - Mar-27-2017

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.


RE: windows grep messed up - Larz60+ - Mar-27-2017

Thanks -- MS-pain