Get 15% Student Discount from the Apple Store Online

Most HE institutions in the UK have a discount with Apple.  Apple have a URL of each one and to access the sotre you normally need to be on the Campus.

However if you go directly to the store URL then you bypass Apples Campus checks.

Here is come BASH code to scan the Apple Campus sites and report back on which URL is for Which institution.

#!/bin/bash

# Apple Discount scanner
# By Daniel Shane

# This script does a simple scan of the Apple Discount URL
# They startat 600 and so far go up to around 866

scanstart=600
scanend=900

while [ $scanstart -lt $scanend ]
do
curl http://store.apple.com/uk_edu_5000$scanstart -o /tmp/curl.txt &> /dev/null
discount=`grep -i "s.prop2 = " /tmp/curl.txt | sed 's/&/\&/g' | cut -d : -f 2 | cut -c 2- | rev | cut -c 3- | rev`
if [ "$discount" != "US Consumer" ]
then
echo "http://store.apple.com/uk_edu_5000$scanstart/" is for "$discount" | tee -a ~/Desktop/DiscountList.txt
fi
scanstart=$(( $scanstart + 1 ))
done