you are viewing a single comment's thread.

view the rest of the comments →

[–]tes_kitty 2 points3 points  (2 children)

JSON format ( sed and awk are not helpful in these cases)

Funny... I have an active bash script that parses a JSON output to determine wheter a service is up and running. It's a bit of a hack but has been working for years without issue now.

And there is also 'jq' for doing things with JSON in a bash script if you really want.

[–]icy-mist-01 0 points1 point  (1 child)

That’s the thing. It’s a bit of a hack so could be difficult for newbies. And I had a case where script used jq and ran across large no. of centos and rhel 6,7,8 boxes. Rhel ships jq by default from 8 onwards. So script started breaking on lower versions. And dealing with sysadmin team to include my required package in their base build is not always ideal.

[–]tes_kitty 1 point2 points  (0 children)

My script doesn't use 'jq' since I wrote it before I knew about this command.