mo/demo/using-arrays
Tyler Akins b16d73b5a7 Updates for how to source "mo" and then use it
When you source mo, it adds the "mo" function to the environment.
2015-08-27 09:44:04 -05:00

11 lines
214 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")" # Go to the script's directory
export ARRAY=( one two "three three three" four five )
. ../mo
cat << EOF | mo
Here are the items in the array:
{{#ARRAY}}
* {{.}}
{{/ARRAY}}
EOF