Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

13 bytes added, 08:19, 16 March 2021
INVESTIGATION 1: CREATING A SHELL SCRIPT
# Issue the following linux command to run your shell script in your current directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">./hello</span><br><br>You should notice an '''ERROR message''' indicating you don't have permissions to run the file. To fix this, you need to<br>'''add execute permissions''' prior to running the shell script.<br><br>
# Issue the following linux command to '''add'''<br>execute permissions for your shell script:<br><span style="color:blue;font-weight:bold;font-family:courier;">chmod u+x hello</span><br><br>
# Issue the following to run your shell script:<br><span style="color:blue;font-weight:bold;font-family:courier;">./hello</span><br><br>Did your shell script run?<br><br><span style="color:red;">'''ATTENTION:''' Students might get FRUSTRATED when performing their '''assignment 3''' when their Bash shell scripts have errors.<br>One major cause is the the OUTPUT of their Bash shell script when run does not '''EXACTLY match''' the required output<br>for the '''correct ''' Bash shell script. <br><br>This requires that you CAREFULLY '''read''' the requirements of your Bash shell script and create it to the EXACT specifications</span><br><br>
# Issue the following Linux command to run a checking script:<br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/myscripts/week10-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>
13,420
edits

Navigation menu