187k views
4 votes
Based on HW 6, Part 2, (or the script file "sub" on the last page of Lab6 Handout), please modify your bash/sed script "mysedprog" so that it will

1. remove the blank lines
2. delete the record for Nancy
3. substitute Jerry's record with Annas record

User Magsafe
by
7.4k points

1 Answer

5 votes

Final answer:

To modify the mysedprog script, you can use specific sed commands to remove blank lines, delete a record, and substitute one record with another.

Step-by-step explanation:

Modifying the mysedprog Script

  1. To remove blank lines, you can use the following command in the script:
  2. To delete the record for Nancy, you can use:
  3. To substitute Jerry's record with Anna's record, you can use:
User Slomo
by
7.4k points