Scripting in Linux–putting commands into a file so you can run them as a group—is a lot easier than running them from the command line because you don’t have to figure out the process over and over again. Aliases can also be used to repeat commands easily, but are really only used for individual commands that are complex or difficult to remember.
As you will see in the examples below, the bash shell provides plenty of commands for testing, looping, creating functions, and annotating your scripts.
[ Get regularly scheduled insights by signing up for Network World newsletters. ]
Source:: Network World – Linux