Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
1  
Why are you doing this in the kernel? Can't you do this in an initialization script? –  Renan Aug 15 '12 at 16:01
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.