Skip to content

Update homework.sh - shell#1

Open
benjso wants to merge 1 commit intomainfrom
benjso-homework-shell
Open

Update homework.sh - shell#1
benjso wants to merge 1 commit intomainfrom
benjso-homework-shell

Conversation

@benjso
Copy link
Copy Markdown
Owner

@benjso benjso commented Apr 25, 2024

Benjamin completed homework for shell, please review and kindly comment. Thanks!

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

What did you learn from the changes you have made?

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

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

How were these changes tested?

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

@mentions of the person or team responsible for reviewing proposed changes (At least 2 people)

@michaeladrouillard
@dtxe

Checklist

  • I can confirm that my changes are working as intended

Benjamin completed homework for shell, please review and kindly comment. Thanks!
@benjso benjso closed this Apr 26, 2024
@benjso
Copy link
Copy Markdown
Owner Author

benjso commented Apr 26, 2024

uoft-dsi-c3-homework-20240426

@benjso benjso reopened this Apr 26, 2024
Copy link
Copy Markdown

@michaeladrouillard michaeladrouillard left a comment

Choose a reason for hiding this comment

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

While this is technically correct, consider using automated methods for inserted text into files, like for loops. For instance:
for i in {1..5}; do for j in {1..5}; do echo "I love data" > "dir$i/file$j.txt" done done
You can learn more about for loops here: https://www.cyberciti.biz/faq/bash-for-loop/.

Only other note is the 10 would create an error if directories no longer exists. ls dir* would be enough :)

@benjso
Copy link
Copy Markdown
Owner Author

benjso commented May 1, 2024

Thank you @michaeladrouillard for your inputs! Will study more on bash scripting :-)

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.

2 participants