13,420
edits
Changes
→INVESTIGATION 3: exit AND break STATEMENTS
# 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,<br>then an '''error message''' with feedback of how to properly issue the shell script with an argument<br>and then '''terminates''' the Bash shell script.<br><br>The symbol '''>&2''' redirects '''standard output''' from the USAGE message<br>to '''standard error''' making like a <u>real</u> error message.<br>This "''neat redirection trick''" will NOT be considered for evaluation for this coverage.<br><br>
# Issue the following Linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">echo $?</span><br><br>What does this '''exit status''' from the previously issued command indicate?<br><br>
# Issue the following command (with in an argument):<br><span style="color:blue;font-weight:bold;font-family:courier;">./exit.bash uli101</span><br><br>What did you notice this time?<br><br>
# Issue the following Linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">echo $?</span><br><br>What does this '''exit status''' from the previously issued command indicate?<br><br>
# Issue the following command (with two arguments and redirecting stderr to a file):<br><span style="color:blue;font-weight:bold;font-family:courier;">./exit.bash uli101 Linux 2> error.txt</span><br><br>What did you notice this time?<br><br>
=INVESTIGATION 4: USING START-UP FILES =