Quoting Dave Vehrs (2021-12-23 21:25:11) > On Thu, Dec 23, 2021 at 04:06:46PM +0100, Jonas Smedegaard wrote: > > I notice that podget depends on grep. > > > > An alternative to grep, ugrep, should be radically faster and should > > support command-line options of GNU grep, so I encourage testing if > > it works as a drop-in replacement - with a speed gain.
> Interesting idea. However Podget is also built for other operating > systems. I can see ugrep packages for FreeBSD and OpenBSD but not for > NetBSD. There also appear to be problems with the MacOS version and > making sure it's dependencies are installed. Don't think this will be > a drop-in replacement given where we expect Podget to work. What I had in mind was not _replace_ with ugrep but do graceful fallback to also work when only classic grep is available - something like this: if command -v ugrep; then alias grep = 'ugrep -G' alias fgrep = 'ugrep -F' else alias fgrep = 'grep -F' fi ...and then replace instances of "grep --fixed-strings" and "grep -F" with "fgrep". (above is untested! Also, I am not familiar with *BSD, and it could be simplified slightly if those system provide fgrep) Key details on ugrep: https://github.com/Genivia/ugrep#grep https://github.com/Genivia/ugrep#performance-results Kind regards, - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature