#!/bin/bash # eqx-get-deviceid-ip-public # # Give a device ID, get public IP EQXDEVICEID="$1" if [[ $1 == "" ]] then \ echo -e "Need device name" echo exit fi # get IP packet \ device get \ --json \ --id $EQXDEVICEID \ 2>/dev/null | \ jq '.ip_addresses[0].address' | \ sed -e 's/"//g'