Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Comparing two json files : shell scripting

$
0
0

I'm comparing two json files which look like:

[   {"type" : 1,"children" : {"nsubj" : {"role" : "topic","POS" : ["noun"            ]         }      },"role" : "vehicle","POS" : ["noun"      ]   },

but there are differences between the two because one json file is made up of 3336 lines, while another is made up of 3724 lines. I would like to write a shell script which would compare the two line by line and whenever it finds a difference, output the line number where the difference occurred.


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>