#!/usr/local/bin/bash # This shell finds the free diskspace on my /usb1 # # Please note that crontab sees the disk in 512Kbytes/blocks - root sees it in 1024Kbytes/blocks! # # Debug information set -x df_result=`/bin/df | /usr/bin/grep /usb1 | /usr/bin/awk '{print $4}'` free_space=`echo "scale=0; ($df_result * 1024) / 2" | /usr/bin/bc` /usr/local/bin/curl http://data.hovmon.com/?cid=2df57b0e709897edf0d7e19db29e60c681ad681f\&val=$free_space echo "$free_space * 512Kbytes"