5,321
edits
(→Usage) |
(→Usage) |
||
Line 60: | Line 60: | ||
* <code>"${DRIVES[@]}"</code> means every element will be a new word | * <code>"${DRIVES[@]}"</code> means every element will be a new word | ||
* <code>"${DRIVES[*]}"</code> will expand the array into a single word | * <code>"${DRIVES[*]}"</code> will expand the array into a single word | ||
==dirname== | |||
[https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself Stack overflow] | |||
How to get the source directory of the bash script | |||
<syntaxhighlight lang="bash"> | |||
!/bin/bash | |||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
</syntaxhighlight> | |||
==<code>.bashrc</code>== | ==<code>.bashrc</code>== |