From 19f5053c19bdd2f9f4f764eb17ef0f096eb87f3e Mon Sep 17 00:00:00 2001 From: Shulhan Date: Fri, 17 Nov 2023 03:18:52 +0700 Subject: all: implement command "env-get" to get value from environment files The env-get command get the value from environment files. Syntax, ---- [dir] ---- The "key" argument define the key where value is stored in environment using "section:sub:name" format. The "dir" argument is optional, its define the directory where environment files will be loaded, recursively, from BaseDir to dir. If its empty default to the current directory. --- _wui/doc/awwan.adoc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to '_wui/doc') diff --git a/_wui/doc/awwan.adoc b/_wui/doc/awwan.adoc index 781d299..d2a264e 100644 --- a/_wui/doc/awwan.adoc +++ b/_wui/doc/awwan.adoc @@ -126,6 +126,31 @@ Encrypted file output: secret.txt.vault $ ---- +=== Command env-get + +The env-get command get the value from environment files. +Syntax, + +---- + [dir] +---- + +The "key" argument define the key where value is stored in environment using +"section:sub:name" format. + +The "dir" argument is optional, its define the directory where environment +files will be loaded, recursively, from BaseDir to dir. +If its empty default to the current directory. + +If the key is not exist it will return an empty string. + +For example, to get the value of "name" under section "host", run + +---- +$ awwan env-get host::name +myhost +---- + === Command env-set The env-set command set the value of environment file. -- cgit v1.3-6-g1900