|
Controlling How Scripts Run |
|
|
|
|
Written by Hemanshu Patel
|
|
Friday, 19 October 2007 |
Controlling How Scripts Run Once you get beyond some trivial scripts, you’ll soon find that a script that just runs command after command after command doesn’t work for most real-world scripts. Instead, you need the capability to perform some sort of logic within the program, test conditions, and take alternative measures if certain tests fail. You may need to perform some operation on each file in a directory or back up only selected files. Shell scripting languages offer a variety of ways to test values and then execute different commands based on the results of the tests. All of these things fall under the concept of controlling how your scripts run.
|
|
Last Updated ( Sunday, 13 January 2008 )
|