From owner-freebsd-questions@FreeBSD.ORG Sun Apr 9 14:39:55 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG 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 421DF16A402 for ; Sun, 9 Apr 2006 14:39:55 +0000 (UTC) (envelope-from jan.grant@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4CE643D55 for ; Sun, 9 Apr 2006 14:39:54 +0000 (GMT) (envelope-from jan.grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk ([137.222.16.62]) by dirg.bris.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1FSb4w-0005wk-Qc; Sun, 09 Apr 2006 15:39:53 +0100 Received: from cse-jg.cse.bris.ac.uk ([137.222.12.37]:53782) by mail.ilrt.bris.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.50) id 1FSb4r-0006dW-8A; Sun, 09 Apr 2006 15:39:49 +0100 Date: Sun, 9 Apr 2006 15:39:44 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@tribble.ilrt.bris.ac.uk To: Malcolm Fitzgerald In-Reply-To: Message-ID: <20060409153819.V96633@tribble.ilrt.bris.ac.uk> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spamassassin: mail.ilrt.bris.ac.uk X-Spam-Score: 0.0 X-Spam-Level: / X-Spam-Score: -1.4 X-Spam-Level: - Cc: freebsd-questions@FreeBSD.ORG, freebsd-questions@freebsd.org Subject: Re: Shell scripting question [newby] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2006 14:39:55 -0000 On Sun, 9 Apr 2006, Malcolm Fitzgerald wrote: > I'm trying to follow the instructions at > > > At point four it offers this shell script. > > cut -f 1 -d '$' /usr/local/freebsd-update/work/md5all | uniq | > while read X; do > if [ -f $X ]; then echo $X; fi; > done | sort > /root/base-old > > Running this from root shell in konsole (bash) I get "while: Expression > Syntax". The various hints and clues I get from the shell, the web and man > bash haven't helped me. Would someone provide the correct syntax for me? That syntax is correct for sh and bash; you're not running it, however. Double-check that after you su to root, you're really running bash. That error is what csh will tell you. -- jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ Whenever I see a dog salivate I get an insatiable urge to ring a bell.