I am trying to do something like:
fn()
{
"reusedPattern")
#do stuff
;;
}
and call it within a select case
select stuff in ${something[@]}
do
case $stuff in
"pattern1")
#do stuff
;;
...
fn
...
*) echo invalid input ;;
done
When executing script, bash doesn't like the function (gives me error regarding the ")" and the ";;").
What would work?