0

I was installed jsawk, resty, and spidermonkey in my system. and it works perfectly.

And now i want to parse the return variable from jsawk , to bash variable. i already try this, and it works. but i want to store the value in variable.

#!/bin/bash
aipi=$(curl -s ipinfo.io/json)
echo $aipi | jsawk 'return this.city'
echo $aipi | jsawk 'return this.region'
echo $aipi | jsawk 'return this.country'

Thank you for your help, this is my first question.

0 Answers0