It will eventually be part of a larger script so it needs to be shell scripted. A simple task in other languages, but I'm having trouble accomplishing it in shell. Basically I have a string and I want to insert a "." at all possible indices within the string. The output can be on newlined or separated by spaces. Can anyone help?
Example:
input: "abcd"
output: ".abcd
a.bcd
ab.cd
abc.d
abcd."
OR
output: ".abcd a.bcd ab.cd abc.d abcd."