{ "cells": [ { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/dev/pts/5\n", "$SHELL: /bin/bash\n", "$0: /bin/bash\n", "$BASH_VERSION: 4.4.12(1)-release\n", "\n", "called by source\n", "q is aliased to `return'\n", "\n", "ps of $$:\n", "bash\n", "\n", "ps tree of $$:\n", "root 301 291 0 14:40 pts/5 00:00:00 /bin/bash --rcfile /opt/conda/lib/python3.7/site-packages/pexpect/bashrc.sh\n", "root 366 301 0 14:42 pts/5 00:00:00 ps -efHww\n", "root 367 301 0 14:42 pts/5 00:00:00 grep 301 --color\n" ] }, { "ename": "", "evalue": "11", "output_type": "error", "traceback": [] } ], "source": [ "source source_OR_sh.sh" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/dev/pts/5\n", "$SHELL: /bin/bash\n", "$0: source_OR_sh.sh\n", "$BASH_VERSION: 4.4.12(1)-release\n", "\n", "called by *sh*\n", "q is aliased to `exit'\n", "\n", "ps of $$:\n", "bash\n", "\n", "ps tree of $$:\n", "root 342 301 0 14:42 pts/5 00:00:00 bash source_OR_sh.sh\n", "root 349 342 0 14:42 pts/5 00:00:00 ps -efHww\n", "root 350 342 0 14:42 pts/5 00:00:00 grep 342 --color\n" ] }, { "ename": "", "evalue": "11", "output_type": "error", "traceback": [] } ], "source": [ "bash source_OR_sh.sh" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "source_OR_sh.sh: 1: source_OR_sh.sh: shopt: not found\n", "/dev/pts/5\n", "$SHELL:\n", "$0: source_OR_sh.sh\n", "$BASH_VERSION:\n", "\n", "called by *sh*\n", "q is an alias for exit\n", "\n", "ps of $$:\n", "sh\n", "\n", "ps tree of $$:\n", "root 28 6 0 May21 ? 00:00:35 /opt/conda/bin/python -m bash_kernel -f /root/.local/share/jupyter/runtime/kernel-0d3351dc-2bb7-420a-8ed1-d5f3a0d01c4c.json\n", "root 351 301 0 14:42 pts/5 00:00:00 sh source_OR_sh.sh\n", "root 358 351 0 14:42 pts/5 00:00:00 ps -efHww\n", "root 359 351 0 14:42 pts/5 00:00:00 grep 351 --color\n" ] }, { "ename": "", "evalue": "11", "output_type": "error", "traceback": [] } ], "source": [ "sh source_OR_sh.sh" ] } ], "metadata": { "kernelspec": { "display_name": "Bash", "language": "bash", "name": "bash" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".sh", "mimetype": "text/x-sh", "name": "bash" } }, "nbformat": 4, "nbformat_minor": 2 }