6 ms·
Sed & Awk - Still friendly after all these years
- vijaydev 17y ago+1. Changing the spacing in a file using sed is cool! Never knew this.
- gchpaco 17y agoSed is actually Turing complete. You'd never want to do it, but you can. It's in the same class of things as the BASIC interpreter written as troff macros, really.
- pkrumins 17y agoAnd a bunch of other things. See my article series on "Sed One-Liners Explained": http://www.catonmat.net/blog/sed-one-liners-explained-part-one/ http://www.catonmat.net/blog/sed-one-liners-explained-part-o...
- mahmud 17y ago$('body').css('word-spacing', 10); God I love firebug and jQuery.
- bonsaitree 17y agoI wouldn't go so far as to say "friendly", but sed is considered an absolute system essential by most (all?) Linux distributions and, therefore, is found under /bin instead of /usr/bin. Just like 'ls'. It's hard NOT to like virtually guaranteed access to the power of regular expressions at any command line.
- mahmud 17y agoIt is required for POSIX compliance. http://www.opengroup.org/onlinepubs/9699919799/ http://www.opengroup.org/onlinepubs/9699919799/
- earle 17y agoWhy is cursory usage of sed and awk hacker news?
- spudlyo 17y agoPersonally I use Perl for these tasks, outside of scripting in disk constrained environments, I have no use for either tool.
- kazuya 17y agoShameless pickup from my tweet a week ago: My haskell programs often end up just like the pipelines I made up with sed and awk 20 yrs ago.