Difference between revisions of "CLI Flow Control"
Jump to navigation
Jump to search
(not currently offered) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | This class is not currently offered. [[User:Laurel|Laurel]] 21:36, 31 July 2010 (UTC) | ||
+ | |||
= Introduction = | = Introduction = | ||
The command line interpreter (BASH) is the program that runs when you hit enter on the command line. It is what knows how to find the command that you've asked it to run and it passes the options and arguments that you typed to that command to execute. However BASH is much more than just a command line interpreter. It's also a programming language. This means that you can use flow control techniques to guide the execution flow of your commands. Wow, that was wordy, what did I mean? What I mean is that you can use some techniques to decide if you want to run a command or possibly to run a command many times in a loop. Let's look at some simple examples. | The command line interpreter (BASH) is the program that runs when you hit enter on the command line. It is what knows how to find the command that you've asked it to run and it passes the options and arguments that you typed to that command to execute. However BASH is much more than just a command line interpreter. It's also a programming language. This means that you can use flow control techniques to guide the execution flow of your commands. Wow, that was wordy, what did I mean? What I mean is that you can use some techniques to decide if you want to run a command or possibly to run a command many times in a loop. Let's look at some simple examples. | ||
Line 6: | Line 8: | ||
= Flow Control Techniques = | = Flow Control Techniques = | ||
== if/then statement == | == if/then statement == | ||
+ | |||
+ | == Instructor Notes == | ||
+ | This class needs help! | ||
+ | |||
+ | [[Category:CLI Quizes]] | ||
+ | [[Category:Classes]] |
Latest revision as of 14:36, 31 July 2010
This class is not currently offered. Laurel 21:36, 31 July 2010 (UTC)
Introduction
The command line interpreter (BASH) is the program that runs when you hit enter on the command line. It is what knows how to find the command that you've asked it to run and it passes the options and arguments that you typed to that command to execute. However BASH is much more than just a command line interpreter. It's also a programming language. This means that you can use flow control techniques to guide the execution flow of your commands. Wow, that was wordy, what did I mean? What I mean is that you can use some techniques to decide if you want to run a command or possibly to run a command many times in a loop. Let's look at some simple examples.
Flow Control Techniques
if/then statement
Instructor Notes
This class needs help!