Lab 4

Before you begin:

Part I

  1. Make a directory called ~/lab4
  2. Locate assign4.txt on Scratch.
  3. Copy assign4.txt to your ~/lab4 directory.
  4. Using assign4.txt do the following:
    • Replace all occurrences of “ip” with “>>”
    • Save file as no_ip.txt.
  5. Using assign4.txt do the following:
    • Delete what is currently on line 3.
    • Type the following: Happy trails to you. on line 3.
    • Save file as trails.txt.
    • Note; You should have a total of 9 lines.
  6. Using assign4.txt do the following:
    • Count how many times it is in the document. There are no spaces on either side of it so it can be part of a word.
    • Put that number on line 2
    • Save file as it_num.txt
  7. Using assign4.txt do the following:
    • Remove line 3 and put it in the buffer.
    • Place line 3 at the end of the document 5 times. You should have a total of 12 lines when done.
    • Save file as no3.txt.

To pass off

This assignment uses an auto-grader. Make sure that you have the correct files on scratch and run grade_lab4.

Take a screenshot of successful completion of the autograder and submit this in canvas. Include the shell prompt and command on your screenshot.

Last Updated 09/16/2019