inline sed replace that is portable across GNU linux and Mac OSX
enable passing through a db hostname with port, socket, etc