For example, I want to run find but the parameter is stored in a varibile.
a='-name "build.sh"'
find . $a
It shows error: find: -name "build.sh": unknown primary or operator
I hope it runs like find . -name "build.sh", how to put the var as parameter`?
Thank you.
a=("-name" "build.sh"); find . "${a[@]}""build.sh", including quotes. It's not the expected behaviour, but it should not give you any error. Are you sure you didn't add a special character in your command, like a non-breakable space?