Skip to content

Add bash commands to assignment_script.sh to process 'DSI Consulting'… - #714

Closed
Keith-88h wants to merge 1 commit into
UofT-DSI:mainfrom
Keith-88h:assignment_shell
Closed

Keith-88h wants to merge 1 commit into
UofT-DSI:mainfrom
Keith-88h:assignment_shell

Conversation

@Keith-88h

Copy link
Copy Markdown

… data

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Updated 'assignment_script.sh' to completed the 'Unix Shell, Git & GitHub - Assignment 1' module.

What did you learn from the changes you have made?

Refreshed my memory on various bash commands, such as 'mkdir', 'mv', 'cp', and 'rm', and being aware of the working directory when programming.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

  1. When creating sub-directories such as 'server_logs', I considered first 'cd'ing into the 'data' folder, so the path could be shorter (and not repeated); then 'cd'ing back to the parent folder, once the commands were complete. However, since this technique was not explicitly stated in the instruction, I did not do it.
  2. For item 8, I considered 'ls' without the '-1', but the output in data/inventory.txt looks is more concise when it is outputted as one file per line. (also easier to parse in programs such as 'wc'.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

When I first ran the script, the 'data/processed/event_logs/ folder was empty. I found a typo in the script, which specified, incorrectly to cp data/raw/*event*logs. This was corrected to cp data/raw'*event*log.

How were these changes tested?

I tested the commands in a separate terminal, as I was updating the script. Then, after deleting the newly created directories and files, I ran the script and confirmed the output.

A reference to a related issue in your repository (if applicable)

n/a

Checklist

  • I can confirm that my changes are working as intended
  • I tested the 'assignment_script.sh' on my computer and it worked as expected

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request was made to the wrong repository. If you are a participant, please close it and open it in your own fork instead. Refer to the Assignment Submission Guide for detailed instructions.

@github-actions github-actions Bot closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant