Relative Content

Tag Archive for bashawk

How to set awk the required number of columns

There is an array of data
https://example.com:description of the site/application:category
http://example.com:description of the site/application:category
android://package name:description of the site/application:category
android://package name|description of the site/application|category

Print some values based on conditions from all json files

I have several json files in a folder and subfolders for which I want to print only 3 fields. I use a for loop over all json files, but here to make it simple, the input below represents 3 json files. For each one, I want to print the “Filename” and “Value” only when inside each file appears at least one “Dmo = Path”. When a files doesn´t contain a “Dmo = Path” block, then only print the filename.