content
This commit is contained in:
parent
5dba54b9d5
commit
2c273a2626
100 changed files with 1534 additions and 0 deletions
26
source/bash/snippets.rst
Normal file
26
source/bash/snippets.rst
Normal file
|
@ -0,0 +1,26 @@
|
|||
********
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue