Skip to contents

Helper function: Create array of values in bash scripts example: myArray=("cat" "dog" "mouse" "frog")

Usage

shellscriptMakeBashArray(variable, vals)

Arguments

variable

Environment variable to store the list in

vals

Array of strings to store into the environment variable

Value

A string similar to: myArray=("cat" "dog" "mouse" "frog")