Join Nostr
2026-09-13 22:55:22 UTC
in reply to

Tim Chase on Nostr: As one who uses both sed(1) and awk(1) regularly, I tend to reach for sed when there ...

As one who uses both sed(1) and awk(1) regularly, I tend to reach for sed when there are simple substitutions or line-ranges to extract (like this use-case), possibly with line-dependent conditions, but that's about it.

Doing anything more complex tends to involve some unholy contortions, at which point I turn to awk. It feels much more like an actual programming-language.

That said, learning the nuances of regex will serve you well with grep, sed, awk, and a multitude of other cases, so I'd encourage starting there.