Skip to content

Commit

Permalink
Fix bash for loop with default option
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmarwitz committed Dec 13, 2024
1 parent 2ef89f1 commit 1bf0671
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nb-convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

jupyter nbconvert --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags no-convert --to script docs/examples/*.ipynb &&
shopt -s nullglob && # Prevents the loop from running if there are no .txt files
for file in docs/examples/*.txt;
do mv -- "$file" "${file%.txt}.py";
done

0 comments on commit 1bf0671

Please sign in to comment.