Skip to content

Assignment shell - #707

Closed
margaretcdeleon wants to merge 2 commits into
UofT-DSI:mainfrom
margaretcdeleon:main
Closed

margaretcdeleon wants to merge 2 commits into
UofT-DSI:mainfrom
margaretcdeleon:main

Conversation

@margaretcdeleon

Copy link
Copy Markdown

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

I updated the project setup script to organize the client data into a standardized directory structure. The changes create data/raw and data/processed directories, organize server, user, and event log files into separate folders, remove files containing IP address information for privacy, and generate an inventory of the processed files.

What did you learn from the changes you have made?

I learned how to use shell commands to create and organize directories, move and copy files using filename patterns, remove files based on naming conventions, and use find to generate an inventory of files. I also learned how the -p option with mkdir can create nested directories when their parent directories do not already exist.

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

I considered creating each processed-data directory with separate mkdir commands, but using mkdir -p allowed me to create all three directories more efficiently in one command. I also could have used separate find commands to identify and copy each type of log file, but wildcard patterns such as server.log were simpler for this task.

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

One challenge was making sure the directory structure existed before moving or copying files into it. I addressed this by creating the required directories first and using mkdir -p for the nested processed-data directories. I also used rm -f when removing IP address files so that the script would not fail if no matching files were found.

How were these changes tested?

I tested the changes by running the setup script and checking the resulting directory structure and files. I used ls -la data/raw to verify the raw files, checked the server_logs, user_logs, and event_logs directories to confirm that the correct log files were copied, and verified that files containing ipaddr were removed. I also checked data/inventory.txt to confirm that it contained the files within the processed-data subdirectories.

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

N/A

Checklist

  • I can confirm that my changes are working as intended

@github-actions

github-actions Bot commented Oct 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 Oct 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