I want to join array elements by using parameter expansion syntax on them and expect following code to work:
declare -a nums=( {1..10} )
echo ${nums[@]// /,}
1 2 3 4 5 6 7 8 9 10
#but
echo ${nums[@]//1/,}
, 2 3 4 5 6 7 8 9 10
Can I make substitution work on white spaces?