Question: UNIX QUESTION Exercise #1. [8 Marks] Create a script that does the following: a. Takes 4 input parameters b. Using the shell special variables print

UNIX QUESTION

Exercise #1. [8 Marks] Create a script that does the following:

a. Takes 4 input parameters b. Using the shell special variables print the following:

i. The command you executed

ii. First input

iii. Second input

iv. Third input

v. Fourth Input

vi. Process Id

vii. Total number of input parameters [ by querying the system for it ]

Exercise #2. [8 Marks] Creates a script that does the following:

a. Takes two input parameters

b. Using the numeric comparison syntax, it tests and prints whether the first input in relation to the second input is

: i. Greater than

ii. Greater than or equal

iii. Less than

iv. Less than or equal

v. Equal

vi. Not equal

c. Using the string comparison syntax, it tests and prints whether the first input in relation to the second input is

i. Greater than

ii. Greater than or equal

iii. Less than

iv. Less than or equa

l v. Equal vi. Not equal

b. Use the following pairs to test your code:

i. 123 14

ii. 55 55

iii. Bad Band

iv. bad Band

v. chaos banana

Exercise #3 [4 Marks] Creates a script that explores the content of a directory, and does the following:

a. Takes as an input the name of a folder at your current working directory

b. Prints the time and date to a file called dirLog which is located at your current working directory

c. Loops through the content of the directory and appends the name of each file found to a file called dirLog

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!