Regular expressions are a powerful concept used for searching, filtering, and manipulating text. This article aims to uncover the basics of using regular expressions to extract information from files while working in a Unix shell. To this end, this post covers the basics of working with grep, sed & awk.
This year we are running an IT Graduate program here at Net-a-Porter. The four graduates are doing three-month rotations with various teams, getting experience with many aspects of our business. I volunteered to give them a quick introduction to shell programming and regular expressions. Killing two birds with one stone, I have adapted the shell programming part of that session into this blog post — the regular expressions part of the workshop will be the topic of a future post.