From owner-freebsd-questions@FreeBSD.ORG Mon Sep 15 10:50:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 517AE16A4BF for ; Mon, 15 Sep 2003 10:50:04 -0700 (PDT) Received: from bmyster.com (loqtis.bmyster.com [65.162.190.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1364243FE3 for ; Mon, 15 Sep 2003 10:50:03 -0700 (PDT) (envelope-from mrb@bmyster.com) Received: from loqtis.bmyster.com (localhost.bmyster.com [127.0.0.1]) by bmyster.com (8.12.9/8.12.9) with ESMTP id h8FHt16f039532 for ; Mon, 15 Sep 2003 13:55:01 -0400 (EDT) Received: (from www@localhost) by loqtis.bmyster.com (8.12.9/8.12.9/Submit) id h8FHst64039531; Mon, 15 Sep 2003 13:54:55 -0400 (EDT) X-Authentication-Warning: loqtis.bmyster.com: www set sender to mrb@bmyster.com using -f Received: from 207.5.142.198 (SquirrelMail authenticated user mrb) by bmyster.com with HTTP; Mon, 15 Sep 2003 13:54:55 -0400 (EDT) Message-ID: <54020.207.5.142.198.1063648495.squirrel@bmyster.com> Date: Mon, 15 Sep 2003 13:54:55 -0400 (EDT) From: "Brent Bailey" To: questions@freebsd.org User-Agent: SquirrelMail/1.4.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Subject: drive space shell script help ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mrb@bmyster.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2003 17:50:04 -0000 Im trying to write a script that will email me when drive space on any given partition is above a certain value. i was trying this ...but no working ... #!/bin/sh # this is a script to check drive space and email HSD dept. # cd ~bbailey rm ~bbailey/drvspc.txt df -k | awk '{print$5}' >~bbailey/drvspc.txt cat drvspc.txt while read i do if [$i > '89']; then mail -s "check drive space on core" bbailey@whatever.com fi echo "done" ME not being that great at shell scripting yet ...i was wondering what im doing wrong here ?? any and all help is greatly appreciated thanx -- Brent Bailey CCNA Bmyster LLC Computer Networking and Webhosting Network Engineer, Webmaster, President http://www.bmyster.com mrb@bmyster.com 207-247-8330