#!/bin/sh

set -e

uri=$1

size=$(curl -s -I $uri | grep "Content-Length:" | cut -d' ' -f2 | tr -d '\015')
size_kbytes=$(echo "$size / 1024" | bc)
echo $size_kbytes
