Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

3 bytes removed, 10:11, 16 March 2021
INVESTIGATION 4: CONTROL FLOW STATEMENTS
'''Perform the Following Steps:'''
<br><br>
: # Confirm that you are located in your '''home''' directory in your Matrix account.<br><br>You can test conditions by issuing '''Linux commands / pipeline commands''' <u>or</u> by using the '''test''' command.<br><br># Confirm that you are located in your '''home''' directory in your Matrix account.<br><br>
# Issue the following Linux commands at the Bash shell prompt to assign values to several variables:<br><span style="color:blue;font-weight:bold;font-family:courier;">course="ULI101"<br>number1=5<br>number2=10</span><br><br>
# Issue the following Linux command to test a condition:<br><span style="color:blue;font-weight:bold;font-family:courier;">test $course = "ULI101"</span><br><br>The '''$?''' variable is used to store an '''exit status''' of the <u>previously-issued</u> command (including the test command).<br>If the exit status is '''zero''', then it indicates a TRUE value and if the status is '''non-zero''', then it indicates a FALSE value.<br><br>
13,420
edits

Navigation menu