In order to write a first-class command-line app, you have to understand a lot of details like arguments, environment variables, STDIN/STDOUT, and more. This post is my humble attempt to cover most of these details and bring together everything you need to know in one place. While it's fun to write little one off utility scripts, sometimes you need to write a real honest to God command-line applic