I have an array of "options" of a command.
my_array=(option1 option2 option3)
I want to call this command in a bash script, using the values from array as options. So, command $(some magic here with my_array) "$1" becomes:
command -option1 -option2 -option3 "$1"
How can I do it? Is it possible?