add a line to every line in a file?
Submitted by Tuesday, 8 May, 2012 - 03:14
on
I want to take a text file which is a program source, and insert a print statement after each line, for example if line 1 is:
x=5
then insert
print "line 1: x=5"
so that when a program crashes hard (as in, the system reboots before I can see what happened) at least I can see the last line that executed.
Is there some kind of macro or plugin that I can use to do things like that?
Thanks.
- Joel
x=5
then insert
print "line 1: x=5"
so that when a program crashes hard (as in, the system reboots before I can see what happened) at least I can see the last line that executed.
Is there some kind of macro or plugin that I can use to do things like that?
Thanks.
- Joel