#!/bin/sh # Create a new notebook JSON structure notebook='{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3" } }, "nbformat": 4, "nbformat_minor": 5 }' [ -z "$1" ] && echo "Enter a file name!" && exit # Write the JSON to a new .ipynb file echo "$notebook" >"$1.ipynb" # Check if the file was created successfully [ -f "$1.ipynb" ] && echo "$1.ipynb created successfully." || echo "Failed to create a Jupyter Notebook."