I just started learning bash/shell for fun, and I'm trying to create a simple script that should take user input, which should be the name of a pre-built array, and then say each item in that array with a pause in between.
Here's what I have so far:
#!/bin/sh
array=("foo" "bar" "baz")
read -p "Which array should I read to you? " answer
for item in ${answer[@]}
do
say "$item [[slnc 1000]]"
done
Please let me know if you can point me in the right direction!