I have below json and using awk to print value of concurrency but it is not giving any output
{
"GlanceImages.list_images": [
{
"runner": {
"type": "constant",
"times": 10,
"concurrency": 1
},
"context": {
"users": {
"tenants": 2,
"users_per_tenant": 2
},
"images": {
"image_url": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"disk_format": "qcow2",
"container_format": "bare",
"images_per_tenant": 4
}
},
"sla": {
"failure_rate": {
"max": 0
}
}
}
]
}
Using awk
echo xyz.json | awk -F: '$1=="concurrency" {print $2}'
It doesnt give any output, what could be the issue. Ultimately I have to read multiple files and sum up all the values of concurrency and finally print the ultimate sum