From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ns1.digitalpath.net ([205.161.255.5] helo=ns1.sunset.net ident=root) by speech.braille.uwo.ca with esmtp (Exim 3.35 #1 (Debian)) id 19z9eB-0005JF-00 for ; Tue, 16 Sep 2003 02:49:11 -0400 Received: from sunset.net (66-42-93-185.stkn.sunset.net [66.42.93.185]) by ns1.sunset.net (8.12.9/8.12.9) with ESMTP id h8G6mVG0013801 for ; Mon, 15 Sep 2003 23:48:32 -0700 Received: (from rreid@localhost) by sunset.net (8.12.8/8.12.8/Submit) id h8G6mKRc027968 for speakup@braille.uwo.ca; Mon, 15 Sep 2003 23:48:20 -0700 From: "Ralph W. Reid" Message-Id: <200309160648.h8G6mKRc027968@sunset.net> Subject: Re: Cut question To: speakup@braille.uwo.ca Date: Mon, 15 Sep 2003 23:48:19 -0700 (PDT) In-Reply-To: from "Mike Keithley" at Sep 14, 2003 06:24:01 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: speakup-admin@braille.uwo.ca Errors-To: speakup-admin@braille.uwo.ca X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: speakup@braille.uwo.ca List-Help: List-Post: List-Subscribe: , List-Id: Speakup is a screen review system for Linux. List-Unsubscribe: , List-Archive: Mike Keithley staggered into view and mumbled: > >Hi list > >I am trying to write a command to return free disk space so I can use it >in a script. My most recent attempt is > >df `pwd` | grep "/" | cut -f4 > >Now this returns the entire line from df like: > >/dev/sdb2 8609476 3522184 4999820 42% / > >What delimiter in cut do I need to pick off field 4? Have you considered using `awk' instead? The following may do what you want: df . | tail -1 | awk '{print $4}' I hope this helps. Have a _great_ day! -- Ralph. N6BNO. Wisdom comes from central processing, not from I/O. rreid@sunset.net http://personalweb.sunset.net/~rreid Opinions herein are either mine or they are flame bait. TAN (x) = SIN (x) / COS (x)