Open main menu

CDOT Wiki β

Changes

Tutorial12: Shell Scripting - Part 2

1 byte removed, 07:23, 21 March 2021
INVESTIGATION 3: exit AND break STATEMENTS
# Save your editing session and exit the text editor (eg. with vi: press '''ESC''', then type ''':x''' followed by '''ENTER''').<br><br>
# '''Add execute permissions''' for this Bash shell script.<br><br>
# Issue the following command (without arguments):<br><span style="color:blue;font-weight:bold;font-family:courier;">./exit.bash</span>)<br><br>What did you notice?<br><br>Since there are no arguments, the test within the running shell script returns FALSE, then an '''error message''' with feedback of how to properly issue the shell script with an argument and terminates the Bash shell script.<br><br>The symbol &gt;&amp;2 redirects standard output from the USAGE message as standard error making like a real error message.<br><br>
13,420
edits