From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25504 invoked from network); 8 Jul 2005 19:25:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Jul 2005 19:25:23 -0000 Received: (qmail 6911 invoked from network); 8 Jul 2005 19:25:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Jul 2005 19:25:17 -0000 Received: (qmail 20362 invoked by alias); 8 Jul 2005 19:25:09 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9062 Received: (qmail 20352 invoked from network); 8 Jul 2005 19:25:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Jul 2005 19:25:08 -0000 Received: (qmail 5902 invoked from network); 8 Jul 2005 19:25:08 -0000 Received: from wproxy.gmail.com (64.233.184.204) by a.mx.sunsite.dk with SMTP; 8 Jul 2005 19:25:03 -0000 Received: by wproxy.gmail.com with SMTP id i6so528867wra for ; Fri, 08 Jul 2005 12:25:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XH9Tjho24EVPvlu3nTgQvd3cb1N+k26E3rkEu/MMbI36bwEouDHzVTQg9muN2TfvYI+iHPjhGRG25cpSN3Y/+XCCigFvBiGr3j5oUexkTBNsbMxj314BHq3t/yVutHzTQjkmrd+/Xq4OpchVm0zPvCnY1WCLuUV9AdaGhxU9Cwo= Received: by 10.54.80.4 with SMTP id d4mr74965wrb; Fri, 08 Jul 2005 12:24:37 -0700 (PDT) Received: by 10.54.128.12 with HTTP; Fri, 8 Jul 2005 12:24:35 -0700 (PDT) Message-ID: Date: Fri, 8 Jul 2005 12:24:35 -0700 From: Travis Spencer Reply-To: Travis Spencer To: zsh-users@sunsite.dk Subject: Re: Help parsing a file from one regex to another In-Reply-To: <1050708171627.ZM16747@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050708073037.GB9744@localhost.localdomain> <1050708171627.ZM16747@candle.brasslantern.com> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 On 7/8/05, Bart Schaefer wrote: > On Jul 8, 5:30pm, Doug Kearns wrote: > > flags=3D( ${=3D${${${(f)"$(<$tmp_file)"}[(r)@main::FLAGS*,(r)\);]}#*\"}= //[^[:upper:][:blank:]]/} ) > So to put the whole thing together: >=20 > flags=3D( ${${$(sed -n -e '/^@main::FLAGS.*)/{p;q;}' -e '/^@main::FLAGS/,= /)/p' <$tmp_file)}//[^[:upper:]]/} ) > shift flags # Throw away the word "FLAGS" from @main::FLAGS >=20 Thanks Bart and Doug for your replies. They were both really helpful. =20 --=20 Regards, Travis Spencer Portland, OR USA