Open main menu

CDOT Wiki β

Changes

OPS245 Scripting Exercises dev

2 bytes removed, 23:51, 14 January 2023
Conditional statements
== Conditional statements ==
==='''Bash'''===
Conditional statements or if statements are used in scripts to add logic. You can test to see if a condition is met and change the behaviour of the script as a result of that condition. Here is a sample if statement:
<pre>
</pre>
'''=== Python'''===
*Python has conditional statements, we just haven't covered them yet. We will cover them in a future lecture.