How to replace the first character of an array element in bash
<p>I am taking an input of elements from the user and displaying it in a file. However, I need to do one more task. I need to replace the first character of each array element with a dot(<code>.</code>) which is unfortunately not working for me.</p>

<p>Please find my code below:</p>

<pre><code>while read line
do
    my_array=("${my_array[@]}" $line)
done

echo ${my_array[@]/my_array[@][0]/.}
</code></pre>

<p>Any help would be highly appreciated, thanks.</p>