#!/bin/bash # # Dependencies: # brew install jq # # Example: # /bin/bash ./results.sh # # Description: # Grabs list of running instances for specified BBC Cosmos component (TEST environment) # SCP's known log locations from remote to new local directory # Enable a form of 'strict mode' for Bash set -euo pipefail IFS=$'\n\t' # Define our expected variables up front cert=${1:-} component=${2:-} user=${3:-} api="https://api.live.bbc.co.uk/cosmos/env/test/component/$component/instances" if [ "$#" -ne 3 ]; then cat <