File content.
[kafka_properties]
listeners=PLAINTEXT://:KAFKA_CLIENT_PORT
default.replication.factor=2
ssl.client.auth=required
ssl.cipher.suites=["TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",]
ssl.enabled.protocols=TLSV1.2
ssl.secure.random.implem=SHA1PRNG
security.inter.broker.protocol=PLAINTEXT
security.protocol=SSL
ssl.endpoint.identification.algorithm=https
[kafka_ports]
KAFKA_CLIENT_PORT=9082
[zookeeper_properties]
clientPort=ZK_CLIENT_PORT
syncLimit=2
initLimit=5
tickTime=2000
autopurge.snapRetainCount=3
autopurge.purgeInterval=1
admin.serverPort=ZK_SERVER_ADMIN_PORT
I am trying to read the values from every section, e.g. [kafka_properties], or [kafka_ports] using this command:
cat file.txt | sed -n '0,/kafka_properties/d;/\[/,$d;/^$/d;p'
And write the values into a different file. It works okay if I don't add the parameter:
ssl.cipher.suites=["TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",]
but after adding the ssl.cipher.suites= parameter to the file.txt sed is not working as expected.
Where am I going wrong ?