Student ID

You can put any integer number here to generate different exercises for practice. However you must submit the activity associated with your ID number to D2L in order to receive credit for the activity.

Translate and Cut

  1. Take a screenshot of these instructions (including your student number) and the file/folder structure below. If you cannot get everything into the screenshot it is okay, just take your ID number and whatever fits on the screen.
  2. Create a folder named a36trcut and copy and paste the contents of the file shown below into a file named X. Each line of the file represents some information that would go into a telephone directory listing. The lines contain the name of the person, the building they work in, and their phone number, each field separated by a special character.
  3. For each of the following items, we are interested in the command, not the output! Make sure to show the command and the output in the same screenshot or we will not be able to provide full marks.
  4. Show the file contents on the screen but change the the separator x to x. While this could be done using 'sed', you must use 'tr' this time. The first line of the output would appear as (all lines would be shown of course):
    sample
  5. Show the file contents on the screen but hide the phone numbers with the '#' character. Again, use tr for this. For example the first line would appear as:
    sample
  6. Show a listing of all people in the phone directory. Just list the name of the person with each person on a separate line:
    sample
  7. Suppose you needed a comma separated list of people in the green building. Write a command that can produce this format of output. Hint: you want only the lines with green, then you want only the first column, then you want a "," instead of a new line character. Your solution may have an extra "," at the end of the line and this is acceptable as long as we have the names and the commas between them. (optional) If you really want to try removing the final "," you could use sed to find the last comma of the line and replace it with a new line character.
    sample

Submission of Work

The daily exercises in this course are based on proving that you have successfully completed the tasks. This is done by determining which command(s) are necessary and collecting a screenshot of the completed work.

For each day, you will submit a PDF file to D2L by 11:30pm. The format MUST BE PDF! Submitting work in any other format will result in a zero. The dropbox closes promptly at 11:30pm and no late submissions by email will be accepted. No special arrangements will be made for any reason. A small number of daily activities will excused at the end of the semester to handle various problems that might arise.

Questions/parts must be clearly labelled. Work submitted without labels will not receive full marks.

Copy and paste these lines into

X
All Rights Reserved by Matrix-admin. Designed and Developed by WrapPixel.