From 1bf06716254d99dd13133c93379193d9d7bc2ac1 Mon Sep 17 00:00:00 2001 From: Thomas Marwitz Date: Fri, 13 Dec 2024 11:59:30 +0100 Subject: [PATCH] Fix bash for loop with default option --- nb-convert.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/nb-convert.sh b/nb-convert.sh index e6da4ef..fded96e 100755 --- a/nb-convert.sh +++ b/nb-convert.sh @@ -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