Since the change at https://sourceware.org/git/?p=bzip2.git;a=commit;f=bzgrep;h=d0b47bde0e2f5bae7502ca55b80ab006523db820 released with 1.0.8, running bzgrep with a list of files only searched the first file. e.g.: $ bzgrep foo /tmp/{3,2,1,0}.bz2 /tmp/3.bz2:foo $ for x in {3..0} ; do printf "/tmp/$x.bz2: " ;bzgrep foo /tmp/$x.bz2; done /tmp/3.bz2: foo /tmp/2.bz2: foo /tmp/1.bz2: foo /tmp/0.bz2: foo
Hi Bill, Could you give some more information about your setup? Which system are you running this on? What does /bin/sh point to? It does seem to work for me as intended: $ ~/src/bzip2/bzgrep foo /tmp/bar{0,1,2,3}.bz2 /tmp/bar0.bz2:foo /tmp/bar1.bz2:foo /tmp/bar2.bz2:foo /tmp/bar3.bz2:foo That is on both a system that has /bin/sh point to bash and on one that has /bin/sh point to dash. Thanks, Mark
I apologize for the noise and the slow response. The original failure was on a MacOS X 10.6.8 system where /bin/sh was a bespoke build of bash 5.0.11, based on the MacPorts configuration but with all libraries other than Apple's libSystem statically linked. I am no longer able to reproduce this issue, despite retrieving old shell histories and versions of bzgrep from backups. I am unable to reproduce the environment and shell options, so I have to conclude that the issue was grounded in some ephemeral configuration that was in effect at that time but I have not been able to replicate now. It does not help that I apparently had at that time at least 4 different scripts named 'bzgrep' which seem to have descended from at least 2 different original sources.