Issue
I am creating a kafka instance creation script and I want to gather the bootstrap server from a describe command.
The command to gather the kafka instance details is.
rhoas kafka describe
the output looks something like this
"admin_api_server_url": "server-address",
"billing_model": "standard",
"bootstrap_server_host": "foobar",
"browser_url": "browser-url",
"cloud_provider": "aws",
What I am looking for is a grep command that will return just foobar
from "bootstrap_server_host"
I have tried
rhoas kafka describe | grep bootstrap_server_host
which returns the whole line.
"bootstrap_server_host": "foobar",
I just want foobar
by itself.
Thanks
Solution
rhoas kafka describe | grep bootstrap_server_host | cut -d \" -f 4
Answered By - Arnaud Valmary Answer Checked By - Marie Seifert (WPSolving Admin)