i have this CERTIFICATE file
-----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 "
" and tr -d "
" :
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/
//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 ?
question from:
https://stackoverflow.com/questions/65844547/tr-d-or-sed-e-s-r-g-cant-remove-crlf-from-file-in-mingw32 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…