Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

7 bytes added, 11:47, 3 September 2020
INVESTIGATION 3: USING CONTROL FLOW STATEMENTS IN SHELL SCRIPTS
'''Perform the Following Steps:'''
: Before learning about logic and loop control-flow statements, you need to first learn about issuing test conditions using the '''test''' command.<br><br>
# Issue the following linux commands 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 previously command issued (including the test command). If the 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