O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.1. Reasons for using a shell script

Shell scripts can save you time in automating repetitive or long tasks and are very powerful. After all, why have a list of commands that does a certain task, where you have to enter the commands manually then look at the output, then decide if it’s the right output you expected? If it is, great, carry on with the next task. If it isn’t, look back to the list to see what to do next. A task can be anything including sorting a file, inserting text into files, migrating files, deleting certain lines from a file, cleaning up old files around the system, doing general administrative work on the system. Creating a script using variables, conditional, arithmetic and iteration constructs, with a touch of system ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required