I just released a small open source utility for POSIX-compliant systems called into. This utility sidesteps the annoying impossibility of using a pipeline to update a file without first explicitly dumping to a temporary file.
Read more about into here
or skip straight to downloading it here
Design and code ©2012 Julian Panetta