# Game Settings File # _parms # Common parameter functions apply_shell_expansion() { declare file="$1" declare data=$(< "$file") declare delimiter="__apply_shell_expansion_delimiter__" declare command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter" eval "$command" } # Process parameter list fn_process_parmlist(){ prefix=$1 file=$2 # Expand variables, remove empties, strip = and " and prefix argument echo $(printf "%s\n" "$(apply_shell_expansion "${file}")" | grep -v '=""' | sed -e "s/^\([^#=]\+\)=\"/${prefix}\1 /g" -e 's/\"$//g') }