ReachableCEO-Profile-FullTi.../vendor/git.knownelement.com/ExternalVendorCode/mo/demo/associative-arrays

20 lines
293 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
cd "$(dirname "$0")" # Go to the script's directory
declare -A DATA
export DATA=([one]=111 [two]=222)
. ../mo
cat <<EOF | mo
Accessing data directly:
DATA: {{DATA}}
One: {{DATA.one}}
Two: {{DATA.two}}
Things in DATA:
{{#DATA}}
Item: {{.}}
{{/DATA}}
EOF