-----BEGIN CERTIFICATE REQUEST-----
MIIFIDCCAwgCAQAwIDEeMBwGA1UEAwwVdmF1bHQudmF1bHQtcGVyc28uc3ZjMIIC
IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2h1Io+IPgBFYa+L9TFQ3hXDk
dKJFHVBHFx6RaYMDHJe75c/Ozq3zwAwlDlPviTvB96OyuBX9KIBDk5b0QCELYHym
omCSm1GO+Izxgu26aBvrbgycwUml+lXqW8R6reMpEBnaIRgOvPhIsncaR3iQBt8m
yPo/v5ouPCrVGJ5Hehi4ll0vwxI5/ETlJIjnDqBODwWRLvktv4ysHRj/4hyh5Yn0
IalOn9Cxo0w2zVQhFE63n3enz7c=
-----END CERTIFICATE REQUEST-----
i try to remove all the CRLF from the file
like this also tried tr -d "\n" and tr -d "\r" :
cat <<EOF >${TMPDIR}/csr.yaml
apiVersion: certificates.k8s.io/v1beta1
kind: CertificateSigningRequest
metadata:
name: ${CSR_NAME}
spec:
groups:
— system:authenticated
request: $(cat ${TMPDIR}/server.csr | base64 | sed -e 's/\r//g')
usages:
— digital signature
— key encipherment
— server auth
EOF
no matter what i do
the end result file the part of the CERTIFICATE content is still contains the line break
How can i remove it ?