Editing with sed in-place to preserve source file credentials