3 ms·
I just checked OpenBSD, and I find that there are 6 total links in /usr/bin: egrep, fgrep, grep, zegrep, zfgrep, and zgrep. The OpenBSD package is superior. T
by chasil 4y ago
I just checked OpenBSD, and I find that there are 6 total links in /usr/bin: egrep, fgrep, grep, zegrep, zfgrep, and zgrep.
The OpenBSD package is superior.
The GNU gzip package includes a zgrep shell script that is adapted from work by "Charles Levert <charles@comm.polymtl.ca>" - this is similarly adapted for bzgrep and xzgrep.
The OpenBSD implementation will have superior performance for zgrep, because it is native C.
rebel$ ls -li /usr/bin/*grep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/egrep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/fgrep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/grep
466711 -r-xr-xr-x 2 root bin 15288 Apr 11 2022 /usr/bin/pgrep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/zegrep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/zfgrep
466612 -r-xr-xr-x 6 root bin 31520 Apr 11 2022 /usr/bin/zgrep