How may I use zgrep to search for A where B is missing.
Like:
-v This option is used to display the lines which doesn’t have the expression present in it.
tried:
zgrep "search_for_this" | zgrep -v "where_this_is_missing file.json.gz
didn't work. What I need is:
{
"name": "name",
"lastname": "lastnameee",
"nickname: "somenickname"
},
{
"name": "name",
"lastname": "lastnameee",
"nickname: "somenickname"
"uniqueId": "1028hasidhad89h1hd"
},
I have some files.json.gz and I want to search for lines where: - name exists && uniqueId doesn't.
Not just skip the value from the returned result, but to ONLY return those lines where those two conditions are met.