Read info from api website and show retrieved data

good evening,

i'm still new in scripting but i'm learning every day and i'm enjoying it.
so i have api website (

htt p://api.nobelprize.org/v1/prize.json

), i want to make a script that allows me to give it two arguments like ./test.sh 2005 physics , 2000 is for the year and physics is category and the result for example is like this:

./test.sh 2005 physics
Roy J. Glauber
John L. Hall
Theodor W. Hänsch

I don't how can i access the file from the internet, i installed an extension i found online for that using sudo apt-install jq but i dont know how to use it.

Thanks alot

Why are you doing this with a shell script?

Is this homework at school?

Web developers do not do this "grab JSON from the net and process it" using shell because there are more modern tools and languages to do this. CGI and shell was used decades ago. Now, we use modern tools made for this kind of processing.

So, I kindly ask you again, why are you doing this using a shell script like bash?

What are you planning to do with the data after you retrieve it using a RESTFUL API?

Do you want to block the processing (the script) while waiting for the network call to return?

If so, why are you not doing this API call asynchronously using an AJAX function? Or more "2019'ish", with an asynchronous promise?

1 Like