I want to creat a script to run an another script with a several parameterexp=([1]=bloc [2]=ins [3]=rep [4]=op)for j in ${!exp[*]}do    arr=([1]=mem [2]=gen [3]=usr)    for i in ${!arr[*]}    do    var=bash createGnuploat.sh ${exp[j]} ../Result/ 0 ${arr[i]} ${exp[j]}    $var    donedoneAnd i have this error :run.sh: line 9: =bash createGnuploat.sh op ../Result/ 0: Aucun fichier ou dossier de ce typeWhat's problem please ?
run bash in script
bash;shell script;quoting
If you need to store a command in a variable, don't use a string, that just can't work. See Bash FAQ #50. Use a function or an array.Your line is parsed as the assignment var=bash createGnuploat.sh ${exp[j]} ../Result/ 0 followed by the two words ${arr[i]} (which will be taken as a command name) and ${exp[j]} (which will be the first and only argument to the command). Check the syntax highlighting in your question or in your editor, it shows what is inside the quoted string.Always use double quotes around variable substitutions, e.g. $foo. Otherwise the value of the variable is split into words that are interpreted as glob patterns. (Omit the double quotes in the 0.01% of the cases where this is desired behavior.) For an array, use ${foo[@]} to have each element of the array in a separate word (${foo[*]} is a single word with the elements of the array separated by spaces; if you leave out the quotes, then each element is broken into separate words that are interpreted as glob patterns).Here's your snippet rewritten using a function:create_plot () {  bash createGnuploat.sh ${exp[$2]} ../Result/ 0 ${arr[$1]} ${exp[$2]}}for j in ${!exp[@]}do    arr=([1]=mem [2]=gen [3]=usr)    for i in ${!arr[@]}    do      create_plot $i $j    donedoneFor the rare cases where it makes sense to use an array variable instead of a function:for j in ${!exp[@]}do    arr=([1]=mem [2]=gen [3]=usr)    for i in ${!arr[@]}    do      var=(bash createGnuploat.sh ${exp[j]} ../Result/ 0 ${arr[i]} ${exp[j]})      ${var[@]}    donedone