Skip to content

Completed bash_basics assignment#235

Open
MarcquellaUmiDillon wants to merge 5 commits intoRahafB:mainfrom
MarcquellaUmiDillon:main
Open

Completed bash_basics assignment#235
MarcquellaUmiDillon wants to merge 5 commits intoRahafB:mainfrom
MarcquellaUmiDillon:main

Conversation

@MarcquellaUmiDillon
Copy link
Copy Markdown

Completed Part II: Parallel universes and Part III: U.N. conflict resolution including branching, parallel edits, and merge conflict resolution.

Copilot AI review requested due to automatic review settings April 1, 2026 04:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR completes the bash_basics assignment by adding the “create an empty file from user input” exercise implementation and including placeholder files used in the parallel/merge workflow portion of the assignment.

Changes:

  • Added a prompt/read flow to capture a filename and create the file in 01-read_input.sh.
  • Added empty placeholder files (test.txt, parallel.txt) likely used for the branching/merge exercises.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 2 comments.

File Description
01-read_input.sh Adds filename prompt + file creation step for the exercise.
test.txt Empty placeholder file added for assignment workflow.
parallel.txt Empty placeholder file added for assignment workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to +16
echo "Enter a filename (parallel version):"
read filename
touch $filename
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

read filename should use read -r to avoid backslash escape processing, and touch $filename should quote the variable (and preferably use --) to prevent word-splitting/globbing and option-like filenames (e.g., a name starting with -) being misinterpreted.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +17
touch $filename
echo "Your file $filename was successfully created in the parallel universe!"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Using touch will not necessarily "create an empty file" if the file already exists (it will just update timestamps). If the exercise requires guaranteeing an empty file, add an existence check and/or truncate the file explicitly (while handling the risk of overwriting).

Suggested change
touch $filename
echo "Your file $filename was successfully created in the parallel universe!"
if [ -e "$filename" ]; then
echo "Warning: $filename already exists and will be emptied."
fi
: > "$filename"
echo "Your empty file $filename was successfully created in the parallel universe!"

Copilot uses AI. Check for mistakes.
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