Open main menu

CDOT Wiki β

Changes

Tutorial12: Shell Scripting - Part 2

306 bytes added, 07:45, 21 March 2021
INVESTIGATION 3: exit AND break STATEMENTS
# 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&gt; error.txt</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>
# Issue the following Linux command to confirm that stderr was redirected to a file:<br><span style="color:blue;font-weight:bold;font-family:courier;">cat error.txt</span><br><br>
=INVESTIGATION 4: USING START-UP FILES =
13,420
edits