rtfd/in/bash/snippets.rst

27 lines
393 B
ReStructuredText
Raw Normal View History

2017-12-02 22:02:37 +00:00
********
Snippets
********
Start a runnable script file
============================
.. code:: bash
#! /bin/bash
Find out current script
=======================
.. code:: bash
SCRIPT_FILE="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIRECTORY="$(dirname "${SCRIPT_FILE}")"
SCRIPT_NAME="$(basename "${SCRIPT_FILE}")"
Quit the interpreter
====================
.. code:: bash
exit