Problem 1: Based on the data file “mysedfile" you created for Lab 6, please complete the following tasks: 1. Create a se

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem 1: Based on the data file “mysedfile" you created for Lab 6, please complete the following tasks: 1. Create a se

Post by answerhappygod »

Problem 1 Based On The Data File Mysedfile You Created For Lab 6 Please Complete The Following Tasks 1 Create A Se 1
Problem 1 Based On The Data File Mysedfile You Created For Lab 6 Please Complete The Following Tasks 1 Create A Se 1 (163.68 KiB) Viewed 24 times
Problem 1: Based on the data file “mysedfile" you created for Lab 6, please complete the following tasks: 1. Create a sed script file "mysedprog" (see the Linux handouts for examples), that removes blank line(s), appends the following two records after Tom's record, and sends the updated information to screen: Cindy 85 94 92 Allen 91 83 95 2. Save the content of your "mysedprog" file, the sed command line you used, and the output. Problem 2: Use the script file “sub” discussed on the last page of this week's handout as a template to complete the following tasks: 1. Follow these steps: a) Make two more copies of file "mysedfile" as "mysedfile2” and “mysedfile3”; b) Create a script file, "mysedscript", that will read the files, “mysedfile”, “mysedfile2”, and "mysedfile3", as its inputs using a for-loop; c) For each file "mysedscript" reads, use sed commands to 1) remove the blank line(s), 2) insert the following record before Jerry's record, and 3) update the files accordingly: i. Allen 91 83 95 2. After making "mysedscript" an executable file, run it. Please verify if "mysedfile", "mysedfile2", and "mysedfile3" are updated as required.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply