Question
You will write a shell script that does a variety of tasks, including manipulating files, performing commands, and writing results to an output file. The
You will write a shell script that does a variety of tasks, including manipulating files, performing commands, and writing results to an output file.
The script should be named assignment5.sh
The script should be set up so that it can run as an executable, and it should run using the Bourne
Again shell (bash). You will need to run it on shell.cs.fsu.edu
Include comments at the top of your script file, which specify your name, the course (COP 3353),
the assignment number, and the date
Some of the tasks will involve writing results of commands to an output file. The output file
should be named "output.txt". Whenever an instruction specifies to write results to "the
output file", this is the file it refers to. The output file should be created by the script itself.
Create an empty directory from which to test the script. This is how your script will be tested
during grading -- from a directory that contains only your script file, to begin with
Any time the instructions call for printing a heading, it should look exactly like this:
=================== Heading text ===================
where you substitute the specified heading text in between the lines above. Example:
=================== Grades test 1 ===================
Your script should perform ALL of the tasks listed below, in order, writing results to the output file where specified.
Tasks (to be performed by the script) 1. Copy files In my home directory (my username is gaitrosd), I have a directory called ufiles. Inside this directory, there are 5 files: filel file2 grades tl t2 Copy these 5 files to your current working directory 2. Grades program --The file called grades is an executable program that will run on shell.cs.fsu.edu. It takes in a set of integer grades from standard input and prints out the class average. The files t1 and t2 contain sample inputs for this program. o Change the permissions on the grades program so that the user (i.e. you) has full o Run the grades program twice, so that it accepts the data in the files t1 and t2 as input o Send the output from these runs of the program to the output file (remember, this is o Print a header to the output file before each run, with header text "Grades Test" and o Example - Afer running this program, you will have added the following to the output read/write/execute access, but nobody else has any access for the two respective runs. output.txt) "Grades Test 2" file -Grades test 1 output from second test run of grades program] loutput from second test run of grades program] 3. Permissions - Change the permissions on filel and file2 so that they are readable and Grades test 2 writable by the user, and read-only for group and everybody elseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started