From owner-freebsd-questions@FreeBSD.ORG Mon Aug 25 08:05:07 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 6826916A4BF for ; Mon, 25 Aug 2003 08:05:07 -0700 (PDT) Received: from webserver.get-linux.org (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id AECC743FAF for ; Mon, 25 Aug 2003 08:05:06 -0700 (PDT) (envelope-from oremanj@webserver.get-linux.org) Received: (qmail 8222 invoked by uid 1000); 25 Aug 2003 15:05:28 -0000 Date: Mon, 25 Aug 2003 08:05:28 -0700 From: Joshua Oreman To: Marco Gon?alves Message-ID: <20030825150528.GA7614@webserver> References: <002a01c367e1$a1f275b0$04fea8c0@moe> <44ptixyata.fsf@be-well.ilk.org> <007a01c36b15$bb0de0c0$6b026b83@marco> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007a01c36b15$bb0de0c0$6b026b83@marco> User-Agent: Mutt/1.4.1i cc: questions@freebsd.org Subject: Re: Cvsup script question 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, 25 Aug 2003 15:05:07 -0000 On Mon, Aug 25, 2003 at 03:32:25PM +0100 or thereabouts, Marco Gon?alves wrote: > Hi, i did some minor alterations to the script by > > #!/usr/local/bin/bash > > /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for errors > /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only errors > /usr/local/sbin/pkgdb -aF > /bin/echo > /bin/echo "Updated ports:" > /usr/local/sbin/portversion | grep "<" # Show only changed ports > > but strangly, at least for me, is that the 2nd line the output is > not being redirected to /dev/null and if i execute this script i > still get lots of output... I bet portsdb is putting its progress messages on standard output. (Programs seem to do that a lot, since stderr is unbuffered). Try: /usr/local/sbin/portsdb -Uu >/dev/null 2>&1 || { echo "FAILED to run portsdb"; exit 1 } That will not give you the error output, but if there's an error it will say so and exit. (You can run portsdb manually and see!) -- Josh