From 547825b336777ca89895e10d9e5c67ef47013267 Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Thu, 3 Mar 2016 11:48:21 +0100 Subject: [PATCH] Add an explanation of magic vars --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 4c0600a..cd823e2 100644 --- a/FAQ.md +++ b/FAQ.md @@ -50,7 +50,7 @@ then you can evalute the correspondign argument and assign it to a variable as f ### What is a magic variable? -The [magic variables](https://github.com/kvz/bash3boilerplate/blob/master/main.sh#L63) in main.sh are special in that... +The [magic variables](https://github.com/kvz/bash3boilerplate/blob/master/main.sh#L63) in `main.sh` are special in that they have a different value, depending on your environment. You can use `${__file}` to get a reference to your current script, `${__dir}` to get a reference to the directory it lives in. This is not to be confused with the location of the calling script that might be sourcing the `${__file}`, which is accessible via `${0}`, and the current directory of the administrator running the script, accessible via `$(pwd)`. Other magic variables are for instance `${__os}` which currently is limited to telling you wether you are on `OSX` and otherwise defaults to `Linux`. ### How do I submit an issue report?