Hi All,
From a list of .gz files i am trying to get the list of files which have the below pattern. The pattern is "segment":"consumer".
{"@id":1,"aosProducts":[{"@id":2,"availability":{"@id":3,"shipInfo":{"@id":4,"key":"3","value":"3–5 business days"},"inStock":true},"context":{"@id":5,"geo":"US","lang":"en-us","segment":"consumer","channel":"common","format":"common","locale":"en_US"}
.
Tried grep and gave as below, but it displayed other files also with different second parameter like "segment:app","segment:periheral" etc. How can we obtain the correct pattern .
grep -Po '"segment": *\K"[^"]*"' *.*