Skip to content

Complete shell assignment - #1

Open
mouweili wants to merge 5 commits into
mainfrom
assignment_shell
Open

mouweili wants to merge 5 commits into
mainfrom
assignment_shell

Conversation

@mouweili

@mouweili mouweili commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

What changes are you trying to make?

Updated assignment_script.sh to create the data directory, move rawdata to data/raw, create processed subfolders, copy server/user/event logs, remove IP address files, and generate inventory.txt.

What did you learn from the changes you have made?

How to use wildcards (*) to match files, and how relative paths work after cd into a directory.

Was there another approach you were thinking about making?

I considered using find instead of wildcards, but cp with wildcards was simpler.

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

At first I put the commands in the wrong order, so mkdir ran before the parent directory existed. I fixed it by reordering the commands and checking the output with set -x.

How were these changes tested?

Ran the script with bash assignment_script.sh, then checked that the folders were created, IP files were removed, and inventory.txt was correct.

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

N/A

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

Checklist

  • [ x ] I can confirm that my changes are working as intended

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Autograder results

question status comment
Part 1 - Q1 ✅
Part 1 - Q2 ✅
Part 1 - Q3 ✅
Part 1 - Q4 ✅
Part 1 - Q5 ✅
Part 1 - Q6 ✅
Part 1 - Q7 ✅
Part 1 - Q8 ✅
Part 2 ❌ coworker-changes branch not found in commit history

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autograder checks failed. Please address the issues listed in the results comment.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Autograder results

question status
Part 1 - Q1 ✅
Part 1 - Q2 ✅
Part 1 - Q3 ✅
Part 1 - Q4 ✅
Part 1 - Q5 ✅
Part 1 - Q6 ✅
Part 1 - Q7 ✅
Part 1 - Q8 ✅
Part 2 ✅

All autograder tests passed. This submission is approved by the autograder.

@khsergvl

khsergvl commented Oct 3, 2026

Copy link
Copy Markdown

Approved

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.

4 participants