Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Help parsing a file from one regex to another



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