- OPS435 -
OPEN SYSTEM AUTOMATION
Lab #1
FOCUS: Your first BASH program.
PART A - Perform the following steps:
- Logon to any Linux-based PC. This MUST be in your Matrix account!
- Download this script.
Save it in your home directory in your Matrix account. Call it birthday.bash. Use chmod to give yourself execute
permission. i.e. chmod u+x birthday
- Run the script. i.e. ./birthday and
enter your own birthday to find out on what day of the week you were born
on.
- Examine the script and once you understand how it works, proceed to PART
B.
PART B - Answer the following questions and refer to the bottom of this page to submit your work to your OPS435 teacher. Murray Saul's classes are required
to answer question #2 in a file called commands.txt in your home directory
in your Matrix account. Any other question will be asked by the submission
program that students will run (see bottom of this page)...
- What is your full name and nine digit Seneca student ID?
- List all the Linux commands, in alphabetic order, used in the script.
- What version of BASH did you use to run the script? Hint: the bash
shell is like any other command (like ls, mv, cat, etc...). Use
the man command (i.e. the "man pages") to get help regarding the bash shell and search
how to determine the version.
- Modify the script so that it displays the calander for your birth month
INSTEAD if giving the weekday on which you were born. Hint: use the man
command to get information about how to use the cal command. Use the appropriate variables (eg. like $year and $month) as options with the cal command to achieve this task.
After completing all of the above tasks, submit your work to your OPS435 instructor.
Use the following command in your Matrix account:
/home/murray.saul/labs/submit-lab1.bash