The trick to understanding awk in all its terse glory is to understand its defaults. Most solutions you see in the wild are a clever symphony of awk defaults stacked on top of each other. In this post, I break down one of the most popular one-liners which should hopefully make future awk-ing pretty straight forward.
Two big announcements: I made my first screen cast 1 I’ve updated the permalink title for all the blog posts here 2 I wanted to make sure that external blogs linking to previous post links wouldn’t break. So in order to do this, I had to edit all of my previous blog posts and add a redirect_from tag. Life is too short to be doing this manually so I whipped up an awk program to do it for me in about 20 minutes.
The trick to understanding awk in all its terse glory is to understand its defaults. Most solutions you see in the wild are a clever symphony of awk defaults stacked on top of each other. In this post, I break down one of the most popular one-liners which should hopefully make future awk-ing pretty straight forward.
Two big announcements: I made my first screen cast 1 I’ve updated the permalink title for all the blog posts here 2 I wanted to make sure that external blogs linking to previous post links wouldn’t break. So in order to do this, I had to edit all of my previous blog posts and add a redirect_from tag. Life is too short to be doing this manually so I whipped up an awk program to do it for me in about 20 minutes.