Chapter 6. Flow Control
The truth about shell programming is that there is no single way to get a job done. Sometimes a given set of circumstances dictates the best way to accomplish a task, but if the circumstances change, the path down which to travel to arrive at the point of accomplishment becomes less certain. Sometimes logic says we should take the path less traveled.
This chapter introduces control structures, mechanisms by which you can automate decision making as your script runs. These decisions can involve the termination of repetitive activities, the testing of a variable value against a series of cases, testing file existence and characteristics, or simply testing a variable for equality. You will see several syntax options that ...
Get Korn Shell Programming by Example 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.