3 ms·
Maybe it's because Perl was really popular at the time I discovered Unix and its tool, but why would you use sed and awk instead of a Perl one-liner? (Or even :
by sqrt17 12y ago
Maybe it's because Perl was really popular at the time I discovered Unix and its tool, but why would you use sed and awk instead of a Perl one-liner? (Or even :s// in vim or M-x query-replace-regexp in emacs, if it's just regex munging)
- emmelaich 12y agoExactly. Use Perl (or maybe Python). sed is bullshit. Do you know it is not actually possible to get output from sed that does not contain a newline?
- Tobu 12y agoAre you sure? sed has -z, it's useful.
- boomlinde 12y agoPerl isn't included in e.g. BusyBox. The additional overhead of including perl in an embedded distribution could be a valid reason for using sed where you could otherwise have used perl.
- Tobu 12y agovim's regex syntax is unusual and sucky. Thankfully running commands is super-easy: :%!sed …