array=(a b c d)
I would like to add a character before each element of the array in order to have this
array=(^a ^b ^c ^d) <
array=(^a ^b ^c ^d)
This way also honor whitespaces in array values:
array=( "${array[@]/#/^}" )
Note, this will FAIL if array was empty and you set previously
set -u
I don't know how to eliminate this issue using short code...