Write shell script for linux os and also produce 2 output files  for the files inside the zip file Include script # inside commentary lines in each

Write shell script for linux os and also produce 2 output files  for the files inside the zip file

Include script # inside commentary lines in each file.

1. Create a shell script that performs a count on three files in the Files folder

• Assign the filenames F95.doc, P22.txt and U52.csv to an array.

• Use a for loop whose variable is assigned to each filename in sequence in the array to do the following:

• Find how many words are in the file and show it to the screen.

• Write the count and filename to an output file.

2. Create a shell script that copies all files that begin with specific letters to a new folder, then counts how many files were copied:

• Create a new folder for the copied files.

• Assign the letters J, M and Q to an array.

• Use a for loop whose variable is assigned to each letter in sequence in the array to do the following:

• Copy all files that begin with the letter in the Files folder to the new folder.

• Echo the letter to the screen.

• Find and state how many files were copied.

• Write the letter and the count to an output file.

• Find the total number of files copied. Show this on the screen and send it to the output file. 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Clinical assignment 8 hours shift report of this patient Patient

Clinical assignment 8 hours shift report of this patient Patient J.D 49 years old, male, A/OX3, FULL code status, using wheelchair, NKDA, Dx: DM, Lewy body, Parkinson disease. Hx: of chronic pain, and seizure. Attending physician is Dr. B Boe. Admitted on 10/13/2020 with chief complaint of blood glucose of

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 3 MGT322 (2nd Term 2023-2024) Deadline: 04/05/2024 @ 23:59 Course Name: Logistics Management Course Code: MGT322 Student’s Name: Khaled Al-Mohsen Semester: 2nd CRN: 26296

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 3 Project Management (MGT 323) Due Date: 04/05/2024 @ 23:59 Course Name: Project Management Student’s Name: Course Code: MGT323 Student’s ID Number: Semester: Second