By David B. Copeland
Speak on to your procedure. With its basic instructions, flags, and parameters, a well-formed command-line program is the fastest solution to automate a backup, a construct, or a deployment and simplify your life.
As Ruby professional David Copeland explains, writing a command-line software that's self-documenting, strong, adaptable and endlessly worthwhile is less complicated than you may imagine. Ruby is especially suited for this job, because it combines high-level abstractions with "close to the steel" procedure interplay wrapped up in a concise, readable syntax. in addition, Ruby has the help of a wealthy environment of open-source instruments and libraries.
Ten insightful chapters every one clarify and exhibit a command-line most sensible perform. you will see the right way to use those instruments to raise the lowliest automation script to a maintainable, polished program.
You'll how one can use loose, open resource parsers to create easy command-line interfaces in addition to command suites. you will see tips to use defaults to maintain suggestions easy for daily clients, whereas giving complicated clients recommendations for extra complicated projects.
There's no cause a command-line program may still lack documentation, even if it really is a part of a aid command or a guy web page; you will find out while and the way to take advantage of either. Your trip from command-line amateur to seasoned ends with a glance at useful methods to checking out your apps, and contains a few enjoyable innovations for outside-the-box, colourful interfaces that would satisfaction your users.
With Ruby, the command line isn't lifeless. lengthy dwell the command line.
What You Need:
All you will need is Ruby, and the power to put in a couple of gem stones alongside the way in which. Examples written for Ruby 1.9.2, yet 1.8.7 should still paintings simply as well.