cat file.txt
This is my CRT.
I am taking the certificate input from user using read command.
Below is my input.
-----BEGIN CERTIFICATE-----
\r\nGGHIDqjCCApICCQDbD5hdEvLLsTANBgkqhkiG9w0BAQsFADCBkTELPOAkGA1UEBhMC\r\nU0ExGTAXBgNVBAgMEEVhc3Rlcm4gUHJvdmluY2UxEjAQBgXBhnhfdxd/liuffgfgseeadR4DmKACPesFIiiiqEKi9ouJtDY7mg7I7\r\n8vPudZ2Qs6x9F/i6/1WBz1UoZBT//gHYYRIBsOUCGwxZJCs1Lcy2zMWf1Um\r\n-
----END CERTIFICATE-----
How can I replace this CRT with this input certificate.
I tried sed "s/CRT/$INPUT/" file_name
but that is not working.