From owner-freebsd-questions@FreeBSD.ORG Mon Sep 15 11:18:20 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 D517016A4BF for ; Mon, 15 Sep 2003 11:18:20 -0700 (PDT) Received: from remt28.cluster1.charter.net (remt28.cluster1.charter.net [209.225.8.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC7CC43F85 for ; Mon, 15 Sep 2003 11:18:19 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt28.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 153829506; Mon, 15 Sep 2003 14:18:19 -0400 From: "Charles Howse" To: , Date: Mon, 15 Sep 2003 13:18:12 -0500 Message-ID: <001101c37bb5$b97a1a70$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <54020.207.5.142.198.1063648495.squirrel@bmyster.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: RE: drive space shell script help ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2003 18:18:20 -0000 > #!/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 This line should be: if [ $i -gt 89 ] ; then The spaces between the leading and trailing brackets are mandatory, and you had 2 spaces between the ; and 'then', and the comparison operator for integers is '-gt' for 'greater than'. I don't believe you need the ticks around 89 either. A great source for help: http://www.tldp.org/LDP/abs/html/