I just tried "sed"ing a file and redirecting the output back into the same file, but it ends up creating an empty file. How do I do this without using a temporary file and renaming the result?
Name:
Anonymous2005-08-14 9:54
I don't think you can.
You might be able to pull it off by sed < file > file, but I doubt it.
Name:
Anonymous2005-08-14 10:15
I would have expected this to be easy, since I would imagine altering a file in place would be one of the more common usages of sed. Amirong?
Name:
Anonymous2005-08-14 14:12
Try <file >file.tmp then delete file and move file.tmp to file