From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 7 00:56:41 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBF2337B401 for ; Mon, 7 Jul 2003 00:56:41 -0700 (PDT) Received: from pc5.i.0x5.de (reverse-213-146-113-119.dialin.kamp-dsl.de [213.146.113.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id 559BE43FDD for ; Mon, 7 Jul 2003 00:56:39 -0700 (PDT) (envelope-from nicolas@dauerreden.de) Received: from pc5.i.0x5.de (localhost [127.0.0.1]) by pc5.i.0x5.de (8.12.8p1/8.12.8) with ESMTP id h677ublr005119 for ; Mon, 7 Jul 2003 09:56:37 +0200 (CEST) (envelope-from nicolas@pc5.i.0x5.de) Received: (from root@localhost) by pc5.i.0x5.de (8.12.8p1/8.12.8/Submit) id h677ubvo005118 for hackers@freebsd.org.magicnowbp; Mon, 7 Jul 2003 09:56:37 +0200 (CEST) Received: from pc5.i.0x5.de (localhost [127.0.0.1]) by pc5.i.0x5.de (8.12.8p1/8.12.8) with ESMTP id h677ualr005114 for ; Mon, 7 Jul 2003 09:56:36 +0200 (CEST) (envelope-from nicolas@pc5.i.0x5.de) Received: (from nicolas@localhost) by pc5.i.0x5.de (8.12.8p1/8.12.8/Submit) id h677ua89005113 for hackers@freebsd.org; Mon, 7 Jul 2003 09:56:36 +0200 (CEST) Date: Mon, 7 Jul 2003 09:56:36 +0200 From: Nicolas Rachinsky To: hackers@freebsd.org Message-ID: <20030707075636.GA4724@pc5.i.0x5.de> Mail-Followup-To: hackers@freebsd.org References: <20030707004626.B56037@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030707004626.B56037@xorpc.icir.org> X-Powered-by: FreeBSD X-Homepage: http://www.rachinsky.de X-PGP-Keyid: C11ABC0E X-PGP-Fingerprint: 19DB 8392 8FE0 814A 7362 EEBD A53B 526A C11A BC0E X-PGP-Key: http://www.rachinsky.de/nicolas/nicolas_rachinsky.asc X-SECURITY: Never trust a running system User-Agent: Mutt/1.5.4i Subject: Re: hints on shell string expansion ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 07:56:42 -0000 * Luigi Rizzo [2003-07-07 00:46 -0700]: > but i because the string of actions is used in several places, > I would love to find a way to group actions into a single > variable and then write something like this > > actions="allow 'deny log' 'pipe 10'" > for act in $actions ; do > echo "add $act ip from 1.2.3.4 to 5.6.7.8" > done actions="allow 'deny log' 'pipe 10'" eval "for act in $actions ; do"' echo "add $act ip from 1.2.3.4 to 5.6.7.8" done' But I'm shure there are better ways. Nicolas