3 ms·
looks interesting, bookmarked (will possibly add tutorial on this someday) one question though, sed is not just search and replace, it is filter + search and r
by asicsp 8y ago
looks interesting, bookmarked (will possibly add tutorial on this someday)
one question though, sed is not just search and replace, it is filter + search and replace (without going into arcane commands like n,N,x,h,etc) - filtering can be done based on regex, line number, combination of these two for blocks of line, etc.. Does sd support these?
- chmln 8y agoNot to derail this submission, but thanks for the consideration! See the first sentence at https://github.com/chmln/sd#comparison-to-sed https://github.com/chmln/sd#comparison-to-sed tl;dr its only find & replace with smart defaults and easy, straightforward syntax because I hated wrangling with sed's quirks. For more features, you're better off with sed. But if you're like me and only really use sed for find/replace, you will have a good time with sd.
- asicsp 8y agooh ok, I missed that line ;) this is like 'tr' in syntax and simplicity, instead of character change, you have character-sequence change and regex has more features than sed grep already has equivalent ripgrep implemented in Rust, I think soon we will have holy trinity grep/sed/awk equivalents in Rust