Okay, this is doing my head in. I can't figure it out anymore.
What I want to do is the following:
1) set pointer to start of file
2) search the file to see if $+($2,*) already exists
3) if so, remove the line
4) set pointer to end of file
5) write $2- to file
I'm not even sure if #1 is needed, but yeah.
I sort of understand how it works, it's just that I can't figure out how to remove a line, and how to set the pointer to the end of the file..
And yes, I realize I could use regular /write, but I'm stubborn and want to use file handlers. :>