Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

2 bytes added, 10:21, 16 July 2020
Using Control Flow Statements in Shell Scripts
<table align="right"><tr valign="top"><td>[[Image:test-1.png|thumb|right|150px|Examples of simple comparisons using the test command.]]</td><td>[[Image:test-2.png|thumb|right|150px|Examples of using additional comparisons using the test command.]]</td></table>Control Flow Statement are used to make your shell scripts more flexible and can adapt to changing situations.
The special parameter '''$? ''' Is used to determine the exit status of the previously issued Linux command.
The exit status will either display a zero (representing TRUE) or a non-zero number (representing FALSE). This can be used to determined if a Linux command was correctly or incorrectly executed.
13,420
edits

Navigation menu