~abyxcos/tech-blog

acc5635f993540ff38ccb3604ad9827a439f7e19 — abyxcos 2 years ago c52028b
Fixed a typo in header levels
1 files changed, 1 insertions(+), 1 deletions(-)

M 2013-08-18-smallblog_howto_part_2.md
M 2013-08-18-smallblog_howto_part_2.md => 2013-08-18-smallblog_howto_part_2.md +1 -1
@@ 7,7 7,7 @@ Well, this was on purpose. Recently, on [Hacker News](https://news.ycombinator.c

As you can see from the previous [post](http://mnetic.ch/blog/2013/08/17/smallblog_howto.md.html) and my commits, this code very much embodies the [MVP](http://en.wikipedia.org/wiki/Minimum_viable_product) principle. The core feature of this software is a single line pipe, surrounded by a few `echo`s, and it grew outwards from that single line. This has the benefit over the top-down approach in that your program always works, and you're only adding features to it. Taking the top-down approach can easily lead to trying to make everything work at once, and attempting to add features to a core that still isn't functioning. So, let's add some features to our core.

# Shell functions
## Shell functions
Yup, shell has functions. And they'll let us stave off some of this uglyness we're getting from piping every line to index.html. So let's take our previous example, and pull out the core of that for loop into a function. Previously, we had this:

    $ cat smallblog