#!/bin/bash jq="/usr/bin/jq" if [[ ! -x "$jq" && -x "/usr/local/bin/jq" ]]; then jq="/usr/local/bin/jq" fi station=$(echo -n "$1" | tr "a-z" "A-Z") token=$(pass show avwx-token) json=$(curl -s -H "Authorization: ${token}" "https://avwx.rest/api/taf/${station:-KBOS}") echo "$json" | "$jq" --raw-output '.raw' 2>&1