bug#65238: grep can not using *.bat file pattern

2023-08-12 Thread Paul Eggert

On 2023-08-12 15:27, Dimitry Andric wrote:


However, in most cases it is easier to use Cygwin or MinGW, which
provide Unix-like shells and all the familiar tools, including a working
grep! :-)


Thanks for explaining. Closing the bug report.






bug#65238: grep can not using *.bat file pattern

2023-08-12 Thread Dimitry Andric
On 12 Aug 2023, at 21:57, Paul Eggert  wrote:
> 
> On 2023-08-12 00:50, moonhk wrote:
>> I am using choco  to install grep on Windows 10.
> 
> As I don't know what choco is, I can't be of much help. I suggest writing to 
> the choco folks, whoever they are, as it's the MS-Windows port that is the 
> problem. Upstream maintainers like me don't know MS-Windows.

"Chocolatey" is a package manager (of sorts) for Windows, see
. It looks like lots of packages available via
this package manager are contributed by individual maintainers, which
apparently do their own builds and upload the resulting binaries. In
this case it is ,
uploaded/maintained by a person called "xoviat". It is unclear how you
should contact this person.

In any case, on Windows command line utilities typically have to do
their own wildcard expansion, but Microsoft provides a relatively simple
way to do so:

https://learn.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments

However, in most cases it is easier to use Cygwin or MinGW, which
provide Unix-like shells and all the familiar tools, including a working
grep! :-)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


bug#65238: grep can not using *.bat file pattern

2023-08-12 Thread Paul Eggert

On 2023-08-12 00:50, moonhk wrote:

I am using choco  to install grep on Windows 10.


As I don't know what choco is, I can't be of much help. I suggest 
writing to the choco folks, whoever they are, as it's the MS-Windows 
port that is the problem. Upstream maintainers like me don't know 
MS-Windows.






bug#65238: grep can not using *.bat file pattern

2023-08-12 Thread Paul Eggert

On 2023-08-11 17:44, moonhk wrote:

F:\shell grep -i call *.bat
grep.exe: *.bat: Invalid argument


Please consult whoever did your MS-Windows port. It's not a problem that 
occurs on GNU/Linux.






bug#65238: grep can not using *.bat file pattern

2023-08-11 Thread moonhk
Hi Support,

Install  by chocolatey

F:\shell grep --v
grep.exe (GNU grep) 3.7
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
https://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
.
Patched by: Michael M. Builov 

Error

F:\shell grep -i call *.bat
grep.exe: *.bat: Invalid argument

F:\shell


one accept file name only

F:\shell grep -i call home.bat
if /i "%~1"=="/?" call :header & call :usage "%~2" & goto :end
if /i "%~1"=="-?" call :header & call :usage "%~2" & goto :end
if /i "%~1"=="-h" call :header & call :usage "%~2" & goto :end
if /i "%~1"=="--help" call :header & call :usage "%~2" & goto :end

F:\shell

-- 
moonhkt
GMT+8