I have a command in the Microsoft Azure cli that produces comma separated output that looks something like this:
In the first value before the comma I want to remove everything before and after TEST-NAME (including the forward slashes) so that the output becomes this:
I've played around with SED but can't quite get the output I want.
Bash:
/subscriptions/test-subscription/resourceGroups/test-resourcegroup/providers/Microsoft.Web/sites/TEST-NAME/providers/Microsoft.Insights/metrics/CpuTime,test-resourcegroup,29.75
In the first value before the comma I want to remove everything before and after TEST-NAME (including the forward slashes) so that the output becomes this:
Bash:
TEST-NAME,test-resourcegroup,29.75
I've played around with SED but can't quite get the output I want.