By David B. Copeland
Speak on to your method. With its easy instructions, flags, and parameters, a well-formed command-line program is the fastest approach to automate a backup, a construct, or a deployment and simplify your life.
As Ruby seasoned David Copeland explains, writing a command-line program that's self-documenting, powerful, adaptable and perpetually necessary is simpler than it's possible you'll imagine. Ruby is especially fitted to this activity, because it combines high-level abstractions with "close to the steel" approach interplay wrapped up in a concise, readable syntax. in addition, Ruby has the help of a wealthy atmosphere of open-source instruments and libraries.
Ten insightful chapters every one clarify and display a command-line most sensible perform. you will see how one can use those instruments to raise the lowliest automation script to a maintainable, polished software.
You'll tips on how to use loose, open resource parsers to create simple command-line interfaces in addition to command suites. you will see how you can use defaults to maintain thoughts uncomplicated for daily clients, whereas giving complicated clients recommendations for extra advanced initiatives.
There's no cause a command-line software should still lack documentation, even if it is a part of a support command or a guy web page; you will find out while and the way to exploit either. Your trip from command-line amateur to seasoned ends with a glance at worthwhile techniques to checking out your apps, and contains a few enjoyable suggestions for outside-the-box, colourful interfaces that would satisfaction your users.
With Ruby, the command line isn't really lifeless. lengthy reside the command line.
What You Need:
All you will need is Ruby, and the facility to put in a couple of gemstones alongside the best way. Examples written for Ruby 1.9.2, yet 1.8.7 should still paintings simply as well.