bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54174: (MacOS Monterey 12.2.1: zsh): grep "string" * is interpreted


From: Marja Koivunen
Subject: bug#54174: (MacOS Monterey 12.2.1: zsh): grep "string" * is interpreted as grep -V when directory has a filename "-Vfilename.ext"
Date: Sat, 26 Feb 2022 13:33:35 -0500

I had a directory with filenames that started with “-“

doing grep on that directory for a “string" did not find anything
although “string was on some of the files”

grep just kept repeating something … FreeBSD

Finally, (with some help) I understood that grep interpreted “-Vfiename” as an 
option -V and 
gave the version info instead of doing grep “string” *

Maybe there is a way to add space after “-V “ and possibly also other options 
that could be used as  part of a filename in some operating systems?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]