Hi, welcome to LQ!
I can't think of a method completely avoiding a temporary file given
the nature of the operation ...
Code:
command | sed 's/$/,/'| paste old_file - > old_file.tmp && mv old_file.tmp old_file
Something like that should work.
Cheers,
Tink