0% found this document useful (0 votes)
14 views

Assignment 2

Uploaded by

wauyokutoyi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Assignment 2

Uploaded by

wauyokutoyi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BSIT 2:1 Systems and Service Automation

Attempt all questions


Duration: Submit by November 02, 2023
All the work must be done on your class virtual machine and scripts upload on the
Learning management system. Include in your script execution procedure

Question One
Write a shell script called num_loop.sh that loops through every number 1 through
20 and prints each number to standard output. The script should also conditionally
print I'm big! for every even number.

Question Two
a) Write a shell script that takes as its arguments your first name, last name,
year of study and programs and prints the output as:
Your first name: _________
Your last name: __________
Your enrolled in: __________
You’re in year: ____________

b) Rewrite the above script using user input

Question Three
Write a shell script that checks if:
a) A directory path /home/ubuntu/access exists and if not create
b) A file /home/ubuntu/acsess/myscript.sh exists and if not create it

You might also like