swcarpentry / shell-novice

The Unix Shell
http://swcarpentry.github.io/shell-novice/
Other
392 stars 979 forks source link

Typo? The Unix Shell: Shell Scripts episode. #1394

Closed phwtsang closed 1 year ago

phwtsang commented 1 year ago

In "[Debugging Scripts]", the instructions are:

  1. Save do-errors.sh in north-pacific-gyre/scripts directory...
  2. Run the script from the north-pacific-gyre directory...

I think following the above instructions will create a NO such file or directory error, not "the output is blank". That is because the bash script and the data files are in two different directories. What am I missing?
Thanks for looking into it.


Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.

If this issue is about a specific episode within a lesson, please provide its link or filename.

Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org.


gcapes commented 1 year ago

Yep, that looks to be a typo - there is no scripts subdirectory

dtxe commented 1 year ago

I'd like to propose two possible solutions to this:

1: Debugging the file not found error [diff]

Advantages: Saving a script or a file in the wrong folder, or trying to use a file that is in a different folder than in one's paradigm is a common programming mistake, so debugging this problem might be a good exercise. Disadvantages: Additional content and I don't think cutting -x debug mode is worth adding this.

2: Removing /scripts [diff]

Advantages: No additional content and a relatively "cleaner" fix that alters course content the least while returning it to a consistent state.

gcapes commented 1 year ago

Thanks for your ideas @dtxe !

My preference would be to fix the typo, so option 2. Would you like to submit a pull request?