GauravG asked:
Hello I am in a situation where I want to fetch IP from a Json file, which is provided by another team and run a expect Script (which I have prepared already) to get the data like ram & cpu info etc.
So basically once the ip is extracted from a Json file my script will ssh into the server and run few commands.
Can we achieve that? If yes how?
I appreciate early answers as I am in asap condition.
Thanks
My answer:
You can use the jq
command to extract arbitrary fields from a JSON file.
View the full question and any other answers on Server Fault.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.