Say I have the word:
zinger
I want to change it to print
z
i
n
g
e
r
This is for a sorting algorithm that I am testing out. I will then use sort on the vertical and change it back to horizontal printing using tr. Once it is horizontal again, I can compare that sorted jumble against a dictionary doing the same munging. It should give me all the words that use the same letters with the same frequency.
Unfortunately, I am having a brain fart and can't figure out how to get sed to convert this from horizontal to vertical.
I tried this:
sed -e 's/(.)/\1\n/g'
but it doesn't work. It says that my back reference on the right hand side is wrong.
Any help would be appreciated.
Jim