Given that I have a file such as
Lorem
Ipsum
Dolor
I want to insert strings (here, the % character) to those empty lines to obtain
Lorem
%
%
Ipsum
%
Dolor
How can I do this? I tried to follow a way similar to the methods defined here without success.