bug#56843: grep mangling lines

2022-07-30 Thread David G. Pickett
I was stunned to see the grep command remove bytes: $ crontab -l|grep clam30 23 * * * /usr/bin/freshclam --datadir=/home/dgp/.clamtk/db --log=/home/dgp/.clamtk/db/freshclam.$(/bin/date +\%b-\%d-\%Y).log >/home/dgp/.clamtk/db/freshcla_cron.log 2>&1 ; /usr/local/bin/clamdscan --config-file=/etc/c

bug#56843: grep mangling lines

2022-07-30 Thread David G. Pickett
      00:00:01 xterm -T x3903 -n x3903 -geometry 80x25 -fn 12x24 -sb -vb -cn -sl -lsdgp         3949    1862  0 12:38 ?        00:00:01 xterm -T x3939 -n x3939 -geometry 80x25 -fn 12x24 -sb -vb -cn -sl -lsdgp@dgp-p6803w:~$  -Original Message- From: Paul Eggert To: David G. Picke

bug#60506: feature: parallel grep --recursive

2023-01-03 Thread David G. Pickett
It seems like we have 2 suggestions: parallel in different files and parallel is large files.  - Parallel in different files is two ways tricky since you need threads and mutex on the file name stream, and in addition for parallel directories, some sort of threads and queue to pass the file name

bug#60506: feature: parallel grep --recursive

2023-01-04 Thread David G. Pickett
reported.With -p, any child terminating on SIGPIPE causes a normal exit. dgp@dgp-p6803w:~$  I was tempted to exec more often if stdin was temporarily dry, but better is the enemy of good enough! -Original Message- From: Paul Jackson To: David G. Pickett ; egg...@cs.ucla.edu ; 60

bug#60506: parallel grep

2023-01-07 Thread David G. Pickett
I recommend cscope for source file analysis. -Original Message- From: Eike Dierks To: 60...@debbugs.gnu.org Sent: Fri, Jan 6, 2023 7:40 pm Subject: bug#60506: parallel grep I was thinking about this again. It looked easy at first, but it is not. My prime use would be to grep in /usr/in

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

2023-05-31 Thread David G. Pickett
I concur with Arnold: stdout/FD1 is for the data stream, stderr/FD2 is for errors and similar user communication outside the data stream.  Finding a file, binary or otherside, should get it reported the same way.  As grep was a *VERY* mature product, such a strange behavior should not have bee

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

2024-03-22 Thread David G. Pickett
Maybe the opposite: -only_lines_with_newline ? Most users consider a line at EOF lacking a trailing newline as still a line, but perhaps some do not? On Friday, March 22, 2024 at 04:25:38 AM EDT, Niels Möller wrote: Paul Eggert writes: > On 3/21/24 06:57, Niels Möller wrote: >> I'm h

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

2024-03-22 Thread David G. Pickett
$ (echo foo;sleep 10;echo bar)|time grep -q foo;echo $?0.00user 0.00system 0:00.00elapsed 50%CPU (0avgtext+0avgdata 2432maxresident)k0inputs+0outputs (0major+107minor)pagefaults 0swaps0$   The shell hangs for 10 seconds on its child pids but grep does not! On Thursday, March 21, 2024 at 11

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

2024-03-22 Thread David G. Pickett
em 0:10.00elapsed 0%CPU (0avgtext+0avgdata 2432maxresident)k0inputs+0outputs (0major+202minor)pagefaults 0swaps$ On Friday, March 22, 2024 at 04:43:56 PM EDT, David G. Pickett" via Bug reports for GNU grep wrote: Maybe the opposite: -only_lines_with_newline ? Most users consider

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

2024-03-24 Thread David G. Pickett
Perhaps the man page should warn users that such last lines are ignored.  Is there a mention under an option to include or disclude them? On Saturday, March 23, 2024 at 05:08:08 PM EDT, Martin Schulte wrote: Hello David! Am Fri, 22 Mar 2024 20:42:12 + (UTC) schrieb "Da

bug#70511: Option to grep into compressed files

2024-04-22 Thread David G. Pickett
One supposes that if the file extension is not trustworthy, one can taste file like the file command, and use libraries like the gzip libraries to handle gzipped files as a stream.  There are so many others: zip files could be treated like directories and all the files in them that match the gl

bug#70511: Option to grep into compressed files

2024-04-23 Thread David G. Pickett
Shell scripting can take file names in from a find or ls with 'while read', or by globbing 'for f in pattern', and examine them one by one, run 'grep -q' to find out if the file or uncompressed stream from that file has a match, and if so 'echo' the file name out, or if you want lines, it can '

bug#71252: why does grep match literal newlines when there are none, even with -z?

2024-05-29 Thread David G. Pickett
I have used sed to load multiple lines into the buffer for analysis.  I am not sure grep wants to go multiline. On Tuesday, May 28, 2024 at 09:04:20 PM EDT, Philippe Cerfon wrote: Hey. I always thought, that grep is line based in a way that the current string doesn't hold the li

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

2024-09-21 Thread David G. Pickett
Linux strace (like Solaris truss) is a bit less confusing than gdb, and does not need assistance from a symbol preserving compile option -g and lack of strip.  It can even start tracing running processes for which you have no source code. On Saturday, September 21, 2024 at 01:41:42 AM EDT,

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

2024-09-20 Thread David G. Pickett
While the output may be bulky, on Linux you can try the strace command to see exactly what it is up to.  It will show the execvp() call, for instance.  You might need a bigger -s! $ strace -f -v -s 262144 On Thursday, September 19, 2024 at 10:29:30 AM EDT, Rodrigo Jorge wrote: Hello

bug#75582: GNU grep 3.4 — enhancing manual

2025-01-18 Thread David G. Pickett
No -r activity? On Saturday, January 18, 2025 at 12:30:01 AM EST, Jim Meyering wrote: On Fri, Jan 17, 2025 at 10:35 AM David G. Pickett wrote: > Should both -r and file names raise an error? > > $ grep -r xxx yyy zzz > grep: yyy: No such file or directory > grep: zzz:

bug#75582: GNU grep 3.4 — enhancing manual

2025-01-17 Thread David G. Pickett
With is rather like if ... else so maybe: When FILE is '-', read standard input.  If no FILE is given, with -r, recursively search the working directory instead, else read standard input.  With fewer than two FILEs, assume -h.  Exit status is 0 if any line is selected, 1 otherwise; if any

bug#75582: GNU grep 3.4 — enhancing manual

2025-01-17 Thread David G. Pickett
Should both -r and file names raise an error? $ grep -r xxx yyy zzzgrep: yyy: No such file or directorygrep: zzz: No such file or directory$ On Thursday, January 16, 2025 at 11:53:29 PM EST, jack...@fastmail.fm wrote: sur-behoffski wrote: >> Blending in documentation about -h immedia

bug#77301: Is this a bug?

2025-03-28 Thread David G. Pickett
You can always init the char one at a time.  :D On Friday, March 28, 2025 at 12:25:34 PM EDT, Dale R. Worley" via Bug reports for GNU grep wrote: arn...@skeeve.com writes: > "Dale R. Worley" via Bug reports for GNU grep wrote: ... >> That is strange:  I can't find any statement that re

bug#77301: Is this a bug?

2025-03-29 Thread David G. Pickett
Maybe put the compiler errors and warnings in a log and use a script to grep out the not previously identified worthless ones?  Some warnings can be stifled to make cleaner code! On Friday, March 28, 2025 at 05:53:18 PM EDT, Paul Eggert wrote: On 3/28/25 11:14, David G. Pickett via