set -ex FILEIPYNB=$1 jupyter nbconvert --to script $1 FILEPY=$(echo $FILEIPYNB | sed 's/.ipynb$/.py/') FILEMD=$(echo $FILEIPYNB | sed 's/.ipynb$/.md/') python convert_python_to_markdown.py "$FILEPY" "$FILEMD"