I write a bash script and i have an array of function names with variable passed to them and i want to execute all of them in a loop.
but when i execute the bash script, i get this error:
a: command not found
how can i do this?
my bash script is look like this:
#!/bin/bash
functions_array=("test a" "test b" "testc")
test() {
echo $1
}
testc() { echo "testc!"; }
for i in ${functions_array[@]}; do
${i}
done