Open main menu

CDOT Wiki β

Changes

Tutorial12: Shell Scripting - Part 2

336 bytes added, 11:18, 21 March 2021
INVESTIGATION 1: ADDITIONAL LOGIC STATEMENTS
# Issue the following linux command to add execute permissions for your shell script:<br><span style="color:blue;font-weight:bold;font-family:courier;">chmod u+x if-5.bash</span><br><br>
# Run your shell script by issuing: <span style="color:blue;font-weight:bold;font-family:courier;">./if-5.bash</span><br><br>What do you notice? Run several times to confirm that the shell script runs correctly for all mark (grade) categories.<br><br>
# Issue the following to run a checking script:<br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/myscripts/week12-check-1</span><br><br>
# If you encounter errors, make corrections and '''re-run''' the checking script until you<br>receive a congratulations message, then you can proceed.<br><br>
:In the next investigation, you will learn more about the '''for''' loop and learn how to use the '''while''' loop for '''error-checking'''.<br><br>
13,420
edits