Hello all, can you please help me convert this sh script I wrote to a ruby? Im working on it as well, but brand new to ruby.

What the code does is run the aws command ...rds-describe-db-instances... pull variables from it, then insert those varribles to outputted JSON.

echo "
     \"checks\": {"
rds-describe-db-instances|awk '$1 == "DBINSTANCE" { print $6,$9 }'| while read S I; do
echo " 
        \"mysql_disk_usage_$I\": {
            \"handlers\": [\"default\",\"mailer_alerts\"],
            \"command\": \"/etc/sensu/plugins/mysql-disk.rb -h$I u -p -s$S\",
            \"interval\": 300,
            \"occurrences\": 1,
            \"subscribers\": [
echo "}}"