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.
Paste and Join
- 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.
- Create a folder named a37pastejoin and copy and paste the contents of the file shown below into a file named X.
-
The file has been arranged with information separated by the
: character in the following
order:
-
Use your knowledge of Linux commands to restructure the data in the column order shown using
":"
characters between the fields.
- id
- brand
- manufacturer
- address
- website
- The process of restructuring the data is going to be several steps and may include commands such as: cut, join, paste, tr, sort, >, mv, cp. A good place to start is going to be to extract each of the columns into a separate file. As you work out the steps write them down on a piece of paper for the next step. If you create any temporary files along the way, you must erase them when you are done (the clean up is part of the exercise and points will be deduced).
-
When you have figured out the steps do the following:
- Erase all files in the folder and paste the original file.
- Use the command cat to show the original file.
- Run the command 'ls'. We should see only one file.
- Issue each command you need to modify the file in order, without mistakes. If you make an error, start the entire process again.
- Use the command cat to show the new format.
- Take a screenshot of all the commands together (one picture)
- Run the command 'ls'. We should see only one file.
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.