At least once a week, and often several times a day, I want to search a
tree of files to list the files in a directory containing a pattern,
along with the *numbers* of patterns in the files. Usually this is
because I'm looking for a file that contains a number of instances of
the pattern, from am
Paul Eggert writes:
> On 4/23/24 11:32 AM, Dale R. Worley wrote:
>> However, it seems "natural" to me that "grep -c -l", that is, "grep
>> --count --files-with-matches", should give me this result.
>
> Yes, that sounds reasonable. Is your patch
Dennis Clarke via Bug reports for GNU grep writes:
> Perhaps a specific example would be helpful.
My most common case is something like
grep -c --files-with-match 'some fragment of a command' ~/temp/shell.10??
which is searching the log files of my old shell sessions to find the
most recent
People have mentioned that it's best for a utility "to do one thing
well". It seems to me that even the existing grep options do three
things (in the complex use cases):
- select a set of files
- uncompress the files (if they're compressed)
- search within the file contents
I am ignoring the cas
Antonio Diaz Diaz writes:
> Dale R. Worley wrote:
>> What doesn't seem to exist is something that does step 2 in a general
>> way. The tool that is needed is something that reads the first few
>> bytes of a file, determines which compression signature is present if
For everyone's critique, here are my changes (to grep 3.11):
diff -u doc/grep.in.1.orig doc/grep.in.1
--- doc/grep.in.1.orig 2024-04-28 18:04:37.494096472 -0400
+++ doc/grep.in.1 2024-04-28 18:24:15.187984393 -0400
@@ -2,7 +2,7 @@
.de dT
.ds Dt \\$2
..
-.dT Time-stamp: "2019-12-29"
+.dT
Antonio Diaz Diaz writes:
> Dale R. Worley wrote:
>> So the construction I'm thinking of would be
>>
>> grep ... --use-compress-program=zcat ... pattern file ...
> Zcat does indeed accept (and ignore) option -d for compatibility with gzip.
> Therefore all
Mary via Bug reports for GNU grep writes:
> Dale R. Worley wor...@alum.mit.edu wrote:
>> [...]
> I already have a patch that I believe is trivial enough to not cause
> copyright concerns, would you like me to send it?
*I* am all in favor of it, but I'm not a grep maintainer!
Dale
Joseph Joshua writes:
> I am encountering an issue with GNU grep version 3.8.
You could help with two things. One is to try this with grep version
3.11, which is the latest. The other is to provide a transcript of what
commands you give and all the output. For instance, you mention "our
build
Joseph Joshua writes:
$ ls -l /path/to/directory
total 4
-rw-r--r-- 1 user user 20 May 17 12:34 file1.txt
-rw-r--r-- 1 user user 15 May 17 12:34 file2.txt
drwxr-xr-x 2 user user 4096 May 17 12:34 subdir
Does this mean that the actual name of the directory is
/path/to/directo
George R Goffe via Bug reports for GNU grep writes:
> Apparently the gcc folks have been busy, tightening up the
> "rules". I'm not sure this isn't one so I'm reporting it.
> pcresearch.c:222:23: error: initializer-string for array of 'char' is too
> long [-Werror=unterminated-string-initializat
arn...@skeeve.com writes:
> "Dale R. Worley" via Bug reports for GNU grep wrote:
...
>> That is strange: I can't find any statement that recent C standards
>> have removed the special case "initialize a char array that doesn't have
>> room for the
php fan writes:
> I have no idea what triggers this, so I haven't been able to produce a
> minimal reproducing example; and I can't share the actual folder with
> which this happens to me all the time.
>
> Sometimes I use "grep -R" on a folder with several repositories, and
> after a few legitimat
Thomas Güttler Mailinglisten writes:
> To make Bash more robust, I use the "strict mode".
>
> This works fine, except that very often I want to filter out some
> output, and it does not matter to me if there is a match or not.
>
> Afaik there is no option to make `grep` always exit with a zero ex
Philip Prindeville via Bug reports for GNU grep
writes:
> It might be useful to have an argument like --glob-regexp to have a
> file containing globbing patterns to match (or exclude) against a
> stream of filenames.
It seems to me what you want is an argument that causes grep to
interpret patter
Thomas Güttler Mailinglisten writes:
> Hi Dale, thank you for your reply. Currently, I work around like this:
>
> echo -e "foo\nbar" | { grep '^#' >comments.txt || true; } |
> some-other-command
The difficulty with that code is that it doesn't satisfy the requirement
you stated:
> Afaik there i
DANIL10RUS writes:
> danil@archlinux ~/minecraft_server> ls purpur-*.jar | grep -i "[^a-z\-\.]"
> purpur-2416.jar
> danil@archlinux ~/minecraft_server> ls purpur-*.jar | grep -i "[^a-z\.\-]"
> purpur-2416.jar
> Hello, encountered a RegEx error. For some reason grep doesn't recognize
> the â-â
17 matches
Mail list logo