Shell Programming (Scripts)

When you're comfortable with the command-line interface, you'll find yourself performing some tasks repeatedly. Personally, if I have to do something more than twice, I'll write a quick script to handle it for me. When you learn how to do this, you have a really powerful ally at your side.

However, writing scripts also necessarily entails a few more steps. For one thing, because you'll save them (probably in a scripts directory), you'll want to be able to reuse them. You might also find that you'll want to have cron run them late at night, or when the system is idle, or just daily so that you don't have to remember to do it yourself. But when you get to this level of sophistication, you'll need to ensure that your ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.