#!/bin/bash api_key=${API_KEY:-$(echo $API_KEY)} if [[ -z $api_key ]]; then echo "Error: API_KEY environment variable is not set." exit 1 fi urlencode() { local string="$1" local strlen=${#string} local encoded="" local pos c o for (( pos=0 ; pos "$word.json" echo "Saved definitions for $word" done