I try to replace the char #
with a newline \n
:
sed -e "s/#/\n/g" > file.txt
this works fine.
Now there is problem with the char #
, when is escaped with -
:
eg.: 123#456-#789#777 should be:
123
456#789
777
The escaped char -
itself can also be escaped:
eg.: 123#456-#789--012#777 should be:
123
456#789-012
777
How can i do this with sed ?