From owner-freebsd-ports Mon May 1 18:58: 5 2000 Delivered-To: freebsd-ports@freebsd.org Received: from smtp11.bellglobal.com (smtp11.bellglobal.com [204.101.251.53]) by hub.freebsd.org (Postfix) with ESMTP id BB2DA37B98C; Mon, 1 May 2000 18:58:00 -0700 (PDT) (envelope-from hoek@FreeBSD.org) Received: from Hamilton-ppp44812.sympatico.ca (Hamilton-ppp106537.sympatico.ca [216.209.128.8]) by smtp11.bellglobal.com (8.8.5/8.8.5) with ESMTP id WAA06601; Mon, 1 May 2000 22:03:56 -0400 (EDT) Received: (from tim@localhost) by Hamilton-ppp44812.sympatico.ca (8.9.3/8.9.1) id VAA36325; Mon, 1 May 2000 21:57:55 -0400 (EDT) (envelope-from tim) Date: Mon, 1 May 2000 21:57:55 -0400 From: Tim Vanderhoek To: Satoshi - Ports Wraith - Asami Cc: ports@FreeBSD.org Subject: Re: deleting empty info/dir files Message-ID: <20000501215755.A36256@Hamilton-ppp44812.sympatico.ca> References: <200005010853.BAA25327@silvia.hip.berkeley.edu> <20000501114242.A21944@ppp.on.bellglobal.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from Satoshi - Ports Wraith - Asami on Mon, May 01, 2000 at 01:37:05PM -0700 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, May 01, 2000 at 01:37:05PM -0700, Satoshi - Ports Wraith - Asami wrote: >>> >>> @unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi >> >> @unexec if [ -f %D/info/dir] && (! sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then rm %D/info/dir; fi > > Could be. But your parens don't match. It is the same expression if you put the closing paren after the grep expression. I need to learn how to use cut'n'paste properly. @unexec if [ -f %D/info/dir ] && (! sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '); then rm %D/info/dir ; fi -- Signature withheld by request of author. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message