2 ms·
How is GNU / BSD sed and awk not awesome?
by johnisgood 7mo ago
How is GNU / BSD sed and awk not awesome?
- MrDrMcCoy 7mo agoLimited regex capabilities. A fast tool that does what sed and awk do with PCRE2 would be amazing.
- johnisgood 7mo agoWell, I would like to tackle that but unfortunately I do not have enough time to do things for free. :( Is there any demand for it anyway?
- MrDrMcCoy 7mo agoI think there would be, but I can only raise my own hand :-) A tool called sd exists that's close enough for sed, but I haven't seen anything similar for awk.
- johnisgood 7mo agoI took a minute to think about it. It would be much more work to add it to awk. :( And replacing every regex evaluation could slow scripts significantly, although this could be a good challenge! :D Are you using "sd" or is there anything wrong with it as a replacement of sed?
- MrDrMcCoy 7mo agoI'm using sd and am reasonably happy with it. Its only downsides are not quite being PCRE and not having the same syntax as sed, so it needs retraining and to be extra sure that it stays available in the places it's needed. The best part about sed is that it can generally be found in any *nix system. I totally get that PCRE is a massive beast and might not be worth the effort. I would gladly settle for a smaller engine that can handle lookahead and lookback. Yeah, they're expensive, but they're powerful and convenient enough for me to still reach for them when I can. Thanks for the consideration :-)
- shawn_w 7mo agoIIRC the GNU sed people looked into adding pcre support but decided it was too much work and that people should just use perl instead.