Computers and Technology

Students will create a BASH shell script to process the data contained in an external file. The external file contains particle names and their momentums (one particle per line) collected during a particle accelerator test at CERN. Write a BASH shell script that uses a combination of the Linux commands cat, cut, grep, numaverage, numbound, uniq, sort, and wc to summarize the data contained in an external file Note 1: Students should use the man command to learn more about each of the above Linux commands. Note 2: Students should avoid using any Linux commands other than those listed above to complete their BASH script. The script should accept the name of the external file as a command-line argument The script should display the total number of particles recorded in the file The script should summarize the data of each unique particle (species): Note 1: Do NOT create temporary files to store data - chain commands together with piping. Note 2: All decimal values should be displayed to six (6) decimal places. Name of particle species Total number of occurrences of the species Minimum momentum of the species Maximum momentum of the species Average momentum of the species Two (2) data files are provided for use with the BASH script: small. dat and large. dat Use the small. dat file to test and perfect the BASH script Use the large. dat file to produce the output you will include in the Linux Lab submission

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:20, mandy9386
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, kameronstebbins
Which tab should you open to find the option for adding a header?
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, ChaosMind
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
image
Computers and Technology, 23.06.2019 21:20, FlowerChild1229
For positive constants a and b, the force between two atoms in a molecule is given f(r) = βˆ’a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
Do you know the correct answer?
Students will create a BASH shell script to process the data contained in an external file. The exte...

Questions in other subjects: