imyjimmy
February 27th, 2009, 10:07 AM
Ok, so I'm getting this weird sed error while programming. I have a bunch of c code that have a variable named 'tofree' which I want to rename to 'freelist'
So of course, what I should do is:
sed 's\tofree\freelist\' getmem.c > getmem.c
and so on for every .c file.
You'd think this would work, but what happens is getmem.c is actually overwritten and turns into an empty file. WTF?
I had to svn revert everything. I thought sed was legit, what's going on?
So of course, what I should do is:
sed 's\tofree\freelist\' getmem.c > getmem.c
and so on for every .c file.
You'd think this would work, but what happens is getmem.c is actually overwritten and turns into an empty file. WTF?
I had to svn revert everything. I thought sed was legit, what's going on?