summaryrefslogtreecommitdiffstats
path: root/source/rainerscript/functions/rs-getenv.rst
diff options
context:
space:
mode:
Diffstat (limited to 'source/rainerscript/functions/rs-getenv.rst')
-rw-r--r--source/rainerscript/functions/rs-getenv.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/rainerscript/functions/rs-getenv.rst b/source/rainerscript/functions/rs-getenv.rst
new file mode 100644
index 0000000..0035a8b
--- /dev/null
+++ b/source/rainerscript/functions/rs-getenv.rst
@@ -0,0 +1,23 @@
+********
+getenv()
+********
+
+Purpose
+=======
+
+getenv(str)
+
+Like the OS call, returns the value of the environment variable,
+if it exists. Returns an empty string if it does not exist.
+
+
+Examples
+========
+
+The following example can be used to build a dynamic filter based on
+some environment variable:
+
+.. code-block:: none
+
+ if $msg contains getenv('TRIGGERVAR') then /path/to/errfile
+