I'm trying to duplicate lines in a text file that contain certain special characters, but in the duplicate, substitute the special character with "regular" ASCII characters. The concrete use-case are accented characters.
éva test frédéric
éva eva test frédéric frederic
For now I can duplicate the lines containing the
é character, but I'm not sure how to search and replace in the capture group.
Here is what I've got so far:
echo 'éva\ntest\nfrédéric' | sed 's/\(.*é.*\)/&\n\1/'
Can I do that with
sed? If not, I'll be glad to work with