I have an array of numbers 0 10 20 30 40 and I am trying to add a string to the front the array so that the output will look like this: 1D: 0 10 20 30 40
I've tried coding it this way:
string="1D: "
new=( $(( $string + ${array[@]} )) )
echo $new
Which gives me this error:
-bash: 1D: value too great for base (error token is "1D")
Can someone assist me in this problem?
Thanks!