How to get full grep work in git bash (msysgit) in windows?

I would like to use grep -o, but there is no option in git bash -o. Is there a way to get full work grepin git bash, like in linux bash shell?

+4
source share
2 answers

There is no -o flag for grep http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html

Instead of sed, you can use

+1
source

There is an open issue on Github (although this is under "nvm"). User UltCombo published a workaround . Citation:

<Git install directory>/bin grep.exe . , -o:

  • GnuWin32 grep 2.5.4 ().
  • ezwinports 'grep 2.10 (). . libprce-0.dll , grep.

, grep- ezwinports , , /. , .

, - .

, MSYS2 grep co.

0

All Articles