Question: Linux Task 1 : bash Scripts ( 2 0 marks ) Submitting your work Your output should be composed of screenshots of the scripts that

Linux Task 1: bash Scripts (20 marks)
Submitting your work
Your output should be composed of screenshots of the scripts that you have developed and also
include screenshots of the testing of the scripts.
Marking scheme for Q 1.1 and 1.2(out of 10)
0 means "No attempt"
2 means "I can tell what question you are trying to answer."
4 means "I can see what you are trying to do."
6 means "A reasonable approach that shows you're on the right lines."
8 means "The script works, but is only tested with the example from the question."
10 means "The script works, and it has been tested with test cases checking for errors."
1.1- using if statements (you can also use for or while)
Write a script (called q1.sh) that will take two arguments and make sure that two arguments are
input. You need to check if they are actually files (report an error if they are a directory). Then you
need to output the first two lines of each file and sum the total number of characters in each file.
1.2- processing a variable number of arguments with while and using if
Write a script (called q2. sh) that will read the arguments as your six module marks and find the
average of the best five marks (the best 100 credits).
Average of best five modules: 60%. Not bold: what your script might output.
Linux Task 1 : bash Scripts ( 2 0 marks )

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 Programming Questions!