(Solved) : Objectives Learn Use Unix Linux File Processing Utilities Process Data Text Files Tasks 1 Q41408918 . . .

Objectives: To learn to use UNIX/Linux file processing utilities to process data in text files. Tasks: 1. In your home direct3.4. Write commands to find a complete list of students who applied for scholarship(s) and output the result to a file namedObjectives: To learn to use UNIX/Linux file processing utilities to process data in text files. Tasks: 1. In your home directory, make a directory called hw3 and change the current working directory to the hw3 directory. 2. Use the vi editor to create three text file s1, s2, and 53. Each contains a list of full names as follows. Assume a school department offers three scholarships to students. A student can apply for one scholarship or more scholarships. The files s1, s2, and s3 are students who applied for Scholarship 1, Scholarship 2, and Scholarship 3, respectively. The student names are sorted in the alphabetic order. Note: Don’t leave any space at the end of a line or a file. s1 s2 s3 Amanda Jones Amber Johnson Brandon Brown Chris Davis Daniel Hall Elizabeth Walker Jack Moore Kevin Young Nick Thompson Nick Turner Nora Parker Robert Wright Tyler Cooper Aaron Smith Amanda Jones Ben Miller Brandon Brown Brian Wilson Daniel Hall George Anderson John Martin Loren Adams Nick Thompson Nora Parker Peter Hill Steve Jones Wayne Philips Aaron Smith Brandon Brown Chris Davis David Clark Jack Moore John Martin Kevin Young Michael Harris Nick Turner Peter Hill Robert Wright 3. Use the vi editor to create a script called hw3script and add commands as follows: 3.1. Write commands to find and display the number of students who applied for each scholarship. 3.2. Write commands to find and display students who applied for two scholarships, Scholarship 1 and 2, Scholarship 1 and 3, or Scholarship 2 and 3, respectively. 3.3. Write commands to find and display students who applied for all three scholarships. Hints: Store results of 3.2 in intermediate files and use them in step 3.3. 3.4. Write commands to find a complete list of students who applied for scholarship(s) and output the result to a file named applicants. The result should NOT contain duplicates and should be sorted in alphabetic order. Hints: Merge student files in a proper way and remove the duplicates. 3.5. Use a command to replace “Nick” with “Nicholas” in the applicants file and save the output to a new file applicants_final. 3.6. Use a command to find all the lines that contain the string “John” in the applicants_final file. 3.7. Write a command to display the final list of students who applied for scholarship(s). 3.8. Write a command to find and display the total number of students who applied for scholarship(s). 3.9. Write a command to output “I certify that this submission is my own original work. — ” followed by your full name 4. Add the execute permission to the owner, group, and others for your script file. 5. Run your script. The output should be similar to the sample output listed below. Submission: Submit a word or pdf document that contains the following two screenshots: 1. A screenshot of the contents of your script file, i.e., after running the command vi hw3script or cat hw3script 2. A screenshot of the output after running your script file, i.e., after executing ./hw3script. Show transcribed image text Objectives: To learn to use UNIX/Linux file processing utilities to process data in text files. Tasks: 1. In your home directory, make a directory called hw3 and change the current working directory to the hw3 directory. 2. Use the vi editor to create three text file s1, s2, and 53. Each contains a list of full names as follows. Assume a school department offers three scholarships to students. A student can apply for one scholarship or more scholarships. The files s1, s2, and s3 are students who applied for Scholarship 1, Scholarship 2, and Scholarship 3, respectively. The student names are sorted in the alphabetic order. Note: Don’t leave any space at the end of a line or a file. s1 s2 s3 Amanda Jones Amber Johnson Brandon Brown Chris Davis Daniel Hall Elizabeth Walker Jack Moore Kevin Young Nick Thompson Nick Turner Nora Parker Robert Wright Tyler Cooper Aaron Smith Amanda Jones Ben Miller Brandon Brown Brian Wilson Daniel Hall George Anderson John Martin Loren Adams Nick Thompson Nora Parker Peter Hill Steve Jones Wayne Philips Aaron Smith Brandon Brown Chris Davis David Clark Jack Moore John Martin Kevin Young Michael Harris Nick Turner Peter Hill Robert Wright 3. Use the vi editor to create a script called hw3script and add commands as follows: 3.1. Write commands to find and display the number of students who applied for each scholarship. 3.2. Write commands to find and display students who applied for two scholarships, Scholarship 1 and 2, Scholarship 1 and 3, or Scholarship 2 and 3, respectively. 3.3. Write commands to find and display students who applied for all three scholarships. Hints: Store results of 3.2 in intermediate files and use them in step 3.3.
3.4. Write commands to find a complete list of students who applied for scholarship(s) and output the result to a file named applicants. The result should NOT contain duplicates and should be sorted in alphabetic order. Hints: Merge student files in a proper way and remove the duplicates. 3.5. Use a command to replace “Nick” with “Nicholas” in the applicants file and save the output to a new file applicants_final. 3.6. Use a command to find all the lines that contain the string “John” in the applicants_final file. 3.7. Write a command to display the final list of students who applied for scholarship(s). 3.8. Write a command to find and display the total number of students who applied for scholarship(s). 3.9. Write a command to output “I certify that this submission is my own original work. — ” followed by your full name 4. Add the execute permission to the owner, group, and others for your script file. 5. Run your script. The output should be similar to the sample output listed below. Submission: Submit a word or pdf document that contains the following two screenshots: 1. A screenshot of the contents of your script file, i.e., after running the command vi hw3script or cat hw3script 2. A screenshot of the output after running your script file, i.e., after executing ./hw3script.

Expert Answer


Answer to Objectives: To learn to use UNIX/Linux file processing utilities to process data in text files. Tasks: 1. In your home d…