bug#69929: Can grep -q report matches in incomplete lines?

2024-03-21 Thread jackson
le: grep -q foo <(sh -c 'printf foo ; sleep 30' &) with: grep -q foo <(sh -c 'printf foo ; echo ; sleep 30' &) In any case, grep is quite line oriented, as implied by an early sentence in the man page grep(1): "PATTERNS is one or more pattern

bug#69929: Can grep -q report matches in incomplete lines?

2024-03-22 Thread jackson
gt; For the time being, I hacked together a tool that does just what I need Bingo. Given that our talents and resources are finite, and our various needs and situations infinite, it's impossible to have general purpose tools that are ideal for every situation. We can do the rest, individually. -- Paul Jackson jack...@fastmail.fm

bug#70511: Option to grep into compressed files

2024-04-23 Thread jackson
would think that minimizing the attack surface on common commands by not linking in non-essential compression libraries would be a no brainer. -- Paul Jackson jack...@fastmail.fm

bug#70540: grep -c -r | grep -v ':0$'

2024-04-25 Thread jackson
d half the command lines I type at a shell prompt fail "command not found".) -- Paul Jackson jack...@fastmail.fm

bug#73360: Error when a long list is provided to grep with "--binary-files=without-match" option

2024-09-20 Thread jackson
let all of us see that file.list, then any of us should be able to easily reproduce this problem. -- Paul Jackson jack...@fastmail.fm

bug#73360: Error when a long list is provided to grep with "--binary-files=without-match" option

2024-09-19 Thread jackson
wild guess speculation would be that you're hitting some unknown limit on xargs when invoked with an argument list that is right at the limit of what your system allows. But I wouldn't bet a cheap beer on that guess being right. -- Paul Jackson jack...@fastmail.fm

bug#74699: need valid explanation / weird 'grep -q' behaviour

2024-12-06 Thread jackson
ot; 2>/dev/null ) | grep -c "^${V}$") -gt 0 ]]; then Or, more efficiently, just "grep -q" directly in TMPOUT and skip the echo and pipe entirely: if grep -q "^${V}$" "${TMPOUT}"; then -- Paul Jackson jack...@fastmail.fm

bug#75197: [Feature Request] Support 'grep -A' without number to show all lines after match

2024-12-30 Thread jackson
me in my book. But, yes, as Paul Eggert notes, command line parsing of 'grep -A 123' would be ambiguous. Is "123" a filename, or a parameter to the "-A" argument? -- Paul Jackson jack...@fastmail.fm

bug#75582: GNU grep 3.4 — enhancing manual

2025-01-16 Thread jackson
derived from some parsimonious variant of my above paragraph, explaining both the "-h" and "-H" options. -- Paul Jackson jack...@fastmail.fm

bug#75582: GNU grep 3.4 — enhancing manual

2025-01-16 Thread jackson
Paul Eggert wrote: >> yup However, perhaps my "little" essay answers some of sur-behoffski's considerations. -- Paul Jackson jack...@fastmail.fm

bug#77800: grep-3.12: write-error-msg test failure on fedora rawhide (f43)

2025-04-15 Thread jackson
x27;stdout_error' flag being set, that leads to the additional error output. -- Paul Jackson jack...@fastmail.fm

bug#16444: bug #16444: grep -r fails with "Bad file descriptor" for mingw-w64

2015-03-11 Thread Paul Jackson
ew. MinGW needs to be "quarantined" in this circumstance, which is what the test for a non-zero inode would (apparently, from what you say) accomplish. In other words, our special handling for MinGW should not alter how we handle everyone else. -- Paul Jackson p...@usa.net

bug#20826: SEEK_HOLE not supported for ext4 for kernel < 3.1

2015-06-16 Thread Paul Jackson
Pádraig Brady wrote: >> How about a linux kernel version check at build time? Binaries are not always executed on the same kernel on which they are built. -- Paul Jackson p...@usa.net

bug#15444: (no subject)

2016-07-13 Thread Paul Jackson
four red numbers "1234". I did not double check the perfection of the above details, so might be off by one or two, here or there. But I'd guess that this might be a "bug" (unexpected feature) in the terminal emulator's handling of ANSI color escape sequences, rather than a bug in grep. -- Paul Jackson p...@usa.net

bug#15444: (no subject)

2016-07-14 Thread Paul Jackson
m either of the last two test cases above, with the red "1234" numbers NOT appearing in an 80 wide xterm or uxterm, but appearing ok if I widen the terminal. -- Paul Jackson p...@usa.net

bug#24858: URGENT: Question about grep

2016-11-02 Thread Paul Jackson
only make sense if you're burning lots of CPU time or project time, on this particular scan. -- Paul Jackson p...@usa.net

bug#22357: grep -f not only huge memory usage, but also huge time cost

2016-12-15 Thread Paul Jackson
an be cast in this form, the "1.6 seconds" for even a rather large example is compelling. In my most common use case, I am dealing with over 10 million entries in one or the other of the words I am looking for, or the search space I am looking in. No variant of "grep -f" that I have ever seen can handle such problems. -- Paul Jackson p...@usa.net

bug#28469: xargs arguments are not passed to grep

2017-09-15 Thread Paul Jackson
l inside the $( ... ) or ` ... ` command substitution, and thus equal to '{}', with $a not yet set to "i" by the final execution of the xargs invocation of the output from that command substitution. -- Paul Jackson p...@usa.net

bug#30326: grep not searching through a text file (thinking it binary)

2018-02-05 Thread Paul Jackson
depends on which version of "ed" is used, I don't need to rename my preferred, archaic, "ed". But, perhaps L. A. Walsh might choose to do with "grep" as I have done with "ed" ... put an old version ahead of the current version on $PATH. (wave to "law" ... hope you're doing well.) -- Paul Jackson p...@usa.net

bug#30326: grep not searching through a text file (thinking it binary)

2018-02-05 Thread Paul Jackson
n order that it can then scan backwards, once it finds a match. The usual line oriented buffering doesn't work so well when the input file might have no, or at least infrequent, line breaks. -- Paul Jackson     p...@usa.net

bug#30326: grep not searching through a text file (thinking it binary)

2018-02-05 Thread Paul Jackson
ratherthan emit nothing in case of an encoding error. However, I can't imagine that this is worth the effort, and (being a stickin the mud old fart) I usually recommend against incompatible changes unless strongly necessary. So ... whatever ... nevermind ... as they say. -- Paul Jackson p...@usa.net

bug#30451: I found problem not solved to my grep

2018-02-13 Thread Paul Jackson
ts first character was a space. The escaped single quotes around the "$1" parameter meant that you were not looking for the three character pattern "sys", but rather for the five character pattern "'sys'" (which is less likely to have appeared in your test data.) -- Paul Jackson p...@usa.net

bug#32750: [PATCH 2/2] dfa: optmization of alternation in NFA

2018-09-18 Thread Paul Jackson
f8noss (struct dfa *d) -- Paul Jackson p...@usa.net

bug#33418: Convert from literal string to ERE?

2018-11-18 Thread Paul Jackson
want, then I think you have it. I am a bit surprised that this pattern works, as the [...] class lacks a closing ']' character. The following alternative is shorter, does the same thing, and I find less surprising: sed -e 's/[]\\[?+{|()]/\\&/g' -- Paul Jackson p...@usa.net

bug#33574: grep -c question

2018-12-02 Thread Paul Jackson
the same results as the command "grep somepattern somefile | wc -l" (each matching line counts once.) -- Paul Jackson p...@usa.net

bug#35043: Is there a way to show file name once just before all the matches in the file?

2019-03-29 Thread Paul Jackson
The following awk command will do this (so long as filenames don't have ':' colon chars): grep IP /etc/protocols /etc/services | awk -F: ' $1 != fname { print $1 ":"; fname = $1; } { sub("^[^:]*:", ""); print; } ' -- Paul Jackson p...@usa.net

bug#35960: grep execution hagns and does not display any output

2019-05-28 Thread Paul Jackson
o they hang? Do they report a fifo or socket file type? Do they also hang, perhaps on a non-responsive network file system? -- Paul Jackson p...@usa.net

bug#35960: grep execution hagns and does not display any output

2019-05-28 Thread Paul Jackson
Gary wins the sharp eyes of the day award. Paul retreats to the kitchen to make a cup of coffee. :) -- Paul Jackson p...@usa.net

bug#37716: grep exit status with -L redirected to /dev/null

2019-10-12 Thread Paul Jackson
any results at all. My strace observations in the previous paragraph are probably reliable. My guess as to the logic grep is using to determine it's process exit status are probably not reliable. -- Paul Jackson p...@usa.net

bug#37716: grep exit status with -L redirected to /dev/null

2019-10-12 Thread Paul Jackson
rsed by the "-q" option. -- Paul Jackson p...@usa.net

bug#37754: wish for grep --and -eX -eY -eZ (X∩Y∩Z intersection, not X∪Y∪Z union)

2019-10-18 Thread Paul Jackson
into the future, I'll follow up with an update pointing to my "ftest" command on github. -- Paul Jackson p...@usa.net

bug#32073: Improvements in Grep (Bug#32073)

2020-01-01 Thread Paul Jackson
ing one usage of grep slower in order to make some other usage faster, and would risk some nasty bugs. -- Paul Jackson p...@usa.net

bug#32073: Improvements in Grep (Bug#32073)

2020-01-01 Thread Paul Jackson
ot;cat" above refers to four legged felines, not to the concatenate command line utility.) -- Paul Jackson p...@usa.net

bug#39368: Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)

2020-01-31 Thread Paul Jackson
]'", does nothing that I can see, on your data, since every line has at least one character that is not an [A-Z] upper case letter, so every line matches that pattern. I would suggest that using "grep -E" (or "egrep") is clearer than using "grep" and escaping the '|' symbols. -- Paul Jackson p...@usa.net

bug#39368: Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)

2020-01-31 Thread Paul Jackson
oh - and the exclusion of lines with the pattern "^\t\t$" makes no difference on your dataset, since that dataset has no lines consisting solely and exactly of two tabs. -- Paul Jackson p...@usa.net

bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Paul Jackson
Watson's libpipeline: http://libpipeline.nongnu.org -- Paul Jackson p...@usa.net

bug#40868: {SPAM 04.0} bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Paul Jackson
P.S. -- on multi-core systems (which most are these days), piping data between executables working in parallel can be a good way to reduce the elapsed clock time of a job, albeit at the expense of higher system CPU utilization. -- Paul Jackson p...@usa.net

bug#41700: grep -v always exiting with 1 for empty file

2020-06-03 Thread Paul Jackson
the code to be consistent with what Andi, reasonably enough, expected. Every time any little detail like this changes, somebody's code breaks quietly in the night. However since I'm not volunteering to submit the documentation (or code) patch, my vote counts for little :). Carry on. --

bug#45432: Use both --include and --exclude at the same time

2021-01-06 Thread Paul Jackson
t;xargs -0", in order to avoid some ancient and regrettable nasty irregularities in how xargs otherwise handles embedded spaces and unbalanced quotation marks in the input stream. See my xargs wrapper for a convenient workaround for this nastiness: http://thepythoniccow.us/x.c.txt --

bug#50129: -f - option doesn't respond to single EOF from TTY.

2021-08-19 Thread Paul Jackson
t;0.12> 21:07:25.408260 read(0, "", 4096) = 0 <1.992492> 21:07:27.400830 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 <0.19> 21:07:27.400921 close(1)= 0 <0.18> 21:07:27.400979 close(2)= 0 <0.19> 21:07:27.401046 exit_group(1) = ? 21:07:27.401259 +++ exited with 1 +++ -- Paul Jackson p...@usa.net

bug#50129: closed (Re: bug#50129: -f - option doesn't respond to single EOF from TTY.)

2021-08-20 Thread Paul Jackson
attern than was grep. See the "Comparative Performance" section of rawscan's github page for these results: https://github.com/ThePythonicCow/rawscan -- Paul Jackson p...@usa.net

bug#56453: 回复: bug#56453: Bug reports

2022-07-09 Thread Paul Jackson
criptor 1) for the data it should search. -- Paul Jackson p...@usa.net

bug#60506: feature: parallel grep --recursive

2023-01-02 Thread Paul Jackson
ds in parallel, and took about 1/4 the time, otherwise performing rather like xargs, which ran one grep command at a time. (Granted, reading either the 'parallel' or 'xargs' man pages is not easy .) -- Paul Jackson p...@usa.net

bug#60506: feature: parallel grep --recursive

2023-01-02 Thread Paul Jackson
ustify the coding, documentation, and maintenance effort. I would expect the time to read the large file in from disk to dominate the total elapsed time in any case. (or maybe I am just jealous that I didn't think of that parallel grep use case myself .) -- Paul Jackson p...@usa.net

bug#60506: feature: parallel grep --recursive

2023-01-03 Thread Paul Jackson
grees that its interface is somewhat borked. See a note Gellis posted a decade after writing xargs, which I include in the above "x.c" source. An amusing bit of history ... -- Paul Jackson p...@usa.net

bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

2023-05-29 Thread Paul Jackson
>> grep '...' 2>&1 But won't that send all error messages into the stdout stream, not just the "binary file matches" messages? -- Paul Jackson p...@usa.net

bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

2023-05-29 Thread Paul Jackson
already know what they are reading.. -- Paul Jackson p...@usa.net

bug#63780: �ظ��� bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

2023-05-29 Thread Paul Jackson
the "binary file matches" error message might come out on the "wrong" (for your use case) file descriptor, and leave all the other grep work to whatever the currently installed "real" grep does. -- Paul Jackson p...@usa.net

bug#63780: �ظ��º bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

2023-05-29 Thread Paul Jackson
-- Paul Jackson p...@usa.net

bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

2023-06-03 Thread Paul Jackson
onable set of tradeoffs, and explained their decisions. Thank-you, Paul Eggert, and others, for continuing to keep ed(1) alive and well. It's been my "standard text editor" for 45 years now, and counting. I'm glad it's in good hands. -- Paul Jackson p...@usa.net

bug#65416: Feature request: include first line of file in output

2023-08-23 Thread Paul Jackson
k 'NR == 1 || /carenas/' USER,TIP john,0 jane,10 carenas,100 @@ USER,TIP carenas,100 awk 'NR == 1 || /carenas/' 0.00s user 0.00s system 88% cpu 0.002 total As I expected, sed is fastest, grep next, and awk slowest of the three, but the 1, 2, and 3 millisecond totals are within the margin of test error. -- Paul Jackson p...@usa.net

bug#65416: Feature request: include first line of file in output

2023-08-23 Thread Paul Jackson
oops - grep slower than awk, not the other way around, on these _highly_ inconclusive timings. -- Paul Jackson p...@usa.net

bug#65416: Feature request: include first line of file in output

2023-08-23 Thread Paul Jackson
erl used to be the King of such challenges. -- Paul Jackson p...@usa.net