Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

409 bytes added, 10:45, 3 March 2021
INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS
# Issue the '''chmod''' command to add execute permissions for the user for the '''command-substitution.bash''' file.<br><br>
# Issue the following to run the user-variables.bash Bash shell script:<br><span style="color:blue;font-weight:bold;font-family:courier;">./command-substitution.bash</span><br><br>Confirm that your shell script displays the correct information for your Matrix account.<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/scripts/week10-check-3 | more</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>  Math Operations Since you do NOT have to declare the data-type of a variable (like in a compiled language such as "'''C'''"), numbers would be stored as '''text''' in variables. Therefore, it is important to use the construct <span style="color:blue;font-family:courier;font-weight:bold">(( ))</span> surrounded by number, variables and math operations to convert numbers (stored as text) into '''numbers'''.
=INVESTIGATION 4: USING CONTROL FLOW STATEMENTS =
13,420
edits

Navigation menu