Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

858 bytes added, 19:42, 10 May 2021
INVESTIGATION 1: CREATING A SHELL SCRIPT
=INVESTIGATION 1: CREATING A SHELL SCRIPT=
<span style="color:red;">'''ATTENTION''': Depending on your ULI101 instruction, you may be required to complete this tutorial for marks in the course.<br>Please refer to your instructor's course notes in terms of marked assigned to the course.<br><br>The due date for successfully completing this tutorial (i.e. '''tutorial 10''') is by '''Friday by midnight''' next week (i.e. '''Week 10''').<br>If your instructor has NOT assigned marks for completing this tutorial, you can perform it for practice purposes.</span><br><br> 
In this investigation, you will learn how to create and run a '''Bash Shell script'''.
</pre>
:WRITE ROUGH WORK AND OUTPUT FROM ISSUING:
:'''./walkthru2.bash apple orange banana'''
 
:ROUGH WORK:
 
:OUTPUT:
 
<br><br>
:'''Walkthru #3:'''
 
:'''cat walkthru2.bash'''
<pre>
#!/usr/bin/bash
 
for x in 1 2 3 4 5
do
 
if [ $((x % 2)) -eq 0 ]
then
echo "this"
else
echo "that"
fi
 
done
 
</pre>
 
:WRITE ROUGH WORK AND OUTPUT FROM ISSUING:
:'''./walkthru3.bash apple orange banana'''
 
:ROUGH WORK:
 
:OUTPUT:
[[Category:ULI101]]
13,420
edits

Navigation menu