Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm compiling my own version of the linux kernel and I was wondering if there is any way to do parse a local XML or JSON file.

share|improve this question
Why are you doing this in the kernel? Can't you do this in an initialization script? – Renan Aug 15 '12 at 16:01
up vote 3 down vote accepted

jsawk will probably do what you need: https://github.com/micha/jsawk

Edit: However I found jshon to work much better. Here is an example: curl 'http://twitter.com/users/username.json' | jshon -e "location" Outputs: "new hampshire"

share|improve this answer
This is great! I was wondering if when the kernel fully loads it could print the parsed text. Could it do that? – Coder404 Aug 15 '12 at 16:02
If you use just run jshon without any options or switches, it "pretty prints" the entire json structure passed to jshon. – Tim Aug 15 '12 at 17:31
great! Thanks for your answer! – Coder404 Aug 15 '12 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.