Skip to content

Conversation

@bkmgit
Copy link
Contributor

@bkmgit bkmgit commented Apr 3, 2024

If this pull request addresses an open issue on the repository, please add 'Closes #NN' below, where NN is the issue number.

Closes #258

Please briefly summarise the changes made in the pull request, and the reason(s) for making these changes.

Make script and text consistent in using quotes and in having the same documentation

bkmgit added 2 commits April 3, 2024 14:48
- Use consistent syntax
- Make it easier to read the example without scrolling
@github-actions
Copy link

github-actions bot commented Apr 3, 2024

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/LibraryCarpentry/lc-shell/compare/md-outputs..md-outputs-PR-259

The following changes were observed in the rendered markdown documents:

 04-loops.md                   |  9 +++++----
 files/my_first_bash_script.sh | 12 +++++++-----
 md5sum.txt                    |  2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2024-04-03 12:05:42 +0000

github-actions bot pushed a commit that referenced this pull request Apr 3, 2024
@kaitlinnewson
Copy link
Member

Hi @bkmgit, thank you for this PR! I've made one small change request above - can you adjust this in your PR?

# file name, first line, and last line of the file

for filename in *.txt
for file in *.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

In this change, however, I would suggest keeping the variable as filename. The problem, as you noted, is the missing quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@morskyjezek Done in #290
@kaitlinnewson Please let me know if further changes are needed, sorry missed the earlier review.

Copy link
Contributor

@morskyjezek morskyjezek left a comment

Choose a reason for hiding this comment

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

The PR adds quotes to that are missing in the sample bash script. As the callout earlier in the lesson points out, quotes should be used in case the file names might have spaces in them.

@morskyjezek morskyjezek merged commit 273962a into LibraryCarpentry:main Nov 18, 2025
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
Auto-generated via `{sandpaper}`
Source  : 273962a
Branch  : main
Author  : Jesse Johnston <morskyjezek@gmail.com>
Time    : 2025-11-18 00:38:01 +0000
Message : Merge pull request #259 from bkmgit/patch-2

Add quotes to variables in script
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
Auto-generated via `{sandpaper}`
Source  : 4ca5d64
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2025-11-18 00:38:57 +0000
Message : markdown source builds

Auto-generated via `{sandpaper}`
Source  : 273962a
Branch  : main
Author  : Jesse Johnston <morskyjezek@gmail.com>
Time    : 2025-11-18 00:38:01 +0000
Message : Merge pull request #259 from bkmgit/patch-2

Add quotes to variables in script
@bkmgit bkmgit deleted the patch-2 branch November 18, 2025 07:33
@bkmgit bkmgit mentioned this pull request Nov 18, 2025
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.

Script in loops section is inconsistent with rest of the text

3 participants