Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active October 13, 2020 14:49
Show Gist options
  • Save KyMidd/7dae4c1c0d0ae8ae40996b1fa21df226 to your computer and use it in GitHub Desktop.
Save KyMidd/7dae4c1c0d0ae8ae40996b1fa21df226 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Author: Kyler Middleton
# Exit script if any command exits with a non-zero status
set -e
# This script downloads the IP ranges from AWS, filters them, and writes them to a file
# Set variables
DATE=`date '+%m-%d-%Y %H:%M:%S'`
# cd to the script directory
cd /home/user/BashHomeDir
# Download ip-ranges from AWS. Stored as ip-ranges.json
echo "Fetching ip-ranges from AWS"
wget -N https://ip-ranges.amazonaws.com/ip-ranges.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment