A simple for loop would do:
input=abcd
for ((i=0; i<${#input}+1; i++))
do
echo ${input::$i}.${input:$i}
done
This just slices up the string at each index and inserts a .
. You can change the echo
to something else like appending to an array if you want to store them instead ouf output them, of course.