Questions Labproject2

doc

School

Florida State College at Jacksonville *

*We aren’t endorsed by this school

Course

4640

Subject

Mechanical Engineering

Date

Oct 30, 2023

Type

doc

Pages

2

Uploaded by MateSeaLionMaster340

Report
COP 4640 – Operating Systems Environments LAB PROJECT 2: Data Manipulation and Shell Scripting in Linux Total Points: 25 1. The following is a list of particles reconstructed in a collision experiment. The first column contains the particle name, the second the measured momentum. ======= lep1.dat ======= NEUTRON 20.900 PION- 0.167 PION- 22.284 NEUTRON 8.037 PION+ 1.192 PION- 0.631 PION+ 0.268 PHOTON 1.160 PHOTON 0.220 PION+ 0.339 KAON- 5.770 PION+ 2.288 PION+ 5.299 PION- 0.296 PION+ 7.830 PHOTON 0.190 PHOTON 0.215 PHOTON 0.670 PROTON 1.765 PHOTON 0.323 PHOTON 0.120 PHOTON 0.695 PION+ 1.967 PION- 2.509 PHOTON 1.766 PHOTON 0.456 Download the file lep1.txt and perform the following functions: a. Use wc to determine how many particles are there in the list. b. Use cut, sort and uniq to form a unique list of particle species; how many species of particles are there? c. Use grep and wc to determine how many particles there are of each species. d. Use cut, sort, head, and tail to determine the maximum and minimum particle momenta. Which particles are they?
2. Repeat the exercise (except part c) with the file lep2.txt; the file contains many more particles. 3. Write a shell script which acts as a DOS command interpreter. DOS uses the commands cd, dir, type, del, ren, and copy to do the same functions as the UNIX commands cd, ls, cat, rm, mv, and cp . This script loops continuously, allowing the user to type in DOS commands, which are stored in the variables $command , $arg1 and $arg2 . The command should be considered by a case statement, which executes an appropriate UNIX command, depending on which DOS command has been given. The script should echo the following instruction to the user: Type Ctrl-C to exit Notes: 1. For questions 1 and 2, be sure to specify the exact commands you have used and the exact output you received at the shell prompt. Then state your answer. As an example, your answer to question 1a might look like: callisto.ccec.unf.edu $ wc file1.dat 2 4 32 file1.dat There are 2 particles in file1.dat 2. For questions 1 and 2, use piping; i.e. don’t waste time creating intermediate files. 3. Use the notes provided by the instructor to get familiar with common data manipulation commands in Linux.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: For each of the following, if the Inverse Function Theorem applies to f at c, find Dg(x, y) both…
Q: QUESTION 39 Lateral flexion at the waist is a movement in a O Saggital Transverse Coronal Medial…
Q: Help. How do you solve this? I am extrmely lost. For the reaction: A(g) B(g) + C(g) 5 moles of A…
Q: Write the complex number 7 - n(0)), with r> 0,0 ≤0 ≤ 2. 6ż in polar form, r(cos(0) + i sin(
Q: An ideal boost converter is required to have a constant output voltage of 12 V at 24 W load. The…
Q: ind all the second-order partial derivatives of the following function. h(x,y) = x eY + 2y + 6 %3D…
Q: A particle’s position along the x-axis is described by x(t) = A t + B t2, where t is in seconds, x…
Q: Discuss the difference between the straight-line method of depreciation and the accelerated methods.…
Q: SA: V ratio affects how quickly glucose can get to where it neds to go (what is it called) Why if a…
Q: In an amusement park ride called The Roundup, passengers stand inside a 16.0m diameter rotating…
Q: 11. The number of 3-letter arrangements of the letters {A, B, C, D, E) using distinct letters is 120…
Q: D Incorrect 3p n = 3 3p l = 0 Incorrect The possible values of me for the 3p subshell are -2, -1,0,…
Q: In Exercises 1–16, divide using long division. State the quotient, q(x), and the remainder, r(x).…
Q: 3. Why are the security consideration important in the planning of system behavior? Give examples to…
Q: the particular solution for the non-homogeneous x" + x = csc² (t). equation varaho Parame.
Q: When chemical A and chemical B are mixed together, and endothermic reaction below occurs:…
Q: Please show more steps to how you got the standard equation. Shouldn't it be 51/5 and 85/3
Q: In a survey of 2341 adults, 745 say they believe in UFOs. Construct a 95% confidence interval for…
Q: (a) Calculate the tension (in N) in a vertical strand of spiderweb if a spider of mass 5.00 x 10-5…
Q: Find the sum of the infinite geometric series. 1 1 1+=+=+=+... 2 4 8 1 1 1 1 1+-+-+ 2 4 8 + ... =…
Q: Required information Skip to question   [The following information applies to the questions…
Q: ਸਨ 2V₂\V-V₂ V+V₂ Partial Fractions