Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Help parsing a file from one regex to another
- X-seq: zsh-users 9062
- From: Travis Spencer <travislspencer@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Help parsing a file from one regex to another
- Date: Fri, 8 Jul 2005 12:24:35 -0700
- 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=
- In-reply-to: <1050708171627.ZM16747@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <e3b7bac05070723366cd51ebf@xxxxxxxxxxxxxx> <20050708073037.GB9744@xxxxxxxxxxxxxxxxxxxxx> <1050708171627.ZM16747@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Travis Spencer <travislspencer@xxxxxxxxx>
On 7/8/05, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jul 8, 5:30pm, Doug Kearns wrote:
> > flags=( ${=${${${(f)"$(<$tmp_file)"}[(r)@main::FLAGS*,(r)\);]}#*\"}//[^[:upper:][:blank:]]/} )
> So to put the whole thing together:
>
> flags=( ${${$(sed -n -e '/^@main::FLAGS.*)/{p;q;}' -e '/^@main::FLAGS/,/)/p' <$tmp_file)}//[^[:upper:]]/} )
> shift flags # Throw away the word "FLAGS" from @main::FLAGS
>
Thanks Bart and Doug for your replies. They were both really helpful.
--
Regards,
Travis Spencer
Portland, OR USA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author