From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Tim Morley (forstreku la legoman koloron de mia retadreso)" Newsgroups: gmane.emacs.help Subject: Re: PO-mode help, please Date: Tue, 22 Feb 2005 22:44:18 GMT Organization: ntl Cablemodem News Service Message-ID: <6BOSd.152$AY3.131@newsfe3-win.ntli.net> References: <381gpvF5gbnrbU1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1109163055 32379 80.91.229.2 (23 Feb 2005 12:50:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Feb 2005 12:50:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 23 13:50:55 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D3vyX-0005Zs-E7 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Feb 2005 13:50:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D3wFs-0007zK-Iz for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Feb 2005 08:08:40 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!feed.news.tiscali.de!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!pe1.news.blueyonder.co.uk!blueyonder!news-out.ntli.net!newsrout1-gui.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe3-win.ntli.net.POSTED!53ab2750!not-for-mail User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: <381gpvF5gbnrbU1@individual.net> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Original-Lines: 30 Original-NNTP-Posting-Host: 80.6.119.86 Original-X-Complaints-To: http://www.ntlworld.com/netreport Original-X-Trace: newsfe3-win.ntli.net 1109112258 80.6.119.86 (Tue, 22 Feb 2005 22:44:18 GMT) Original-NNTP-Posting-Date: Tue, 22 Feb 2005 22:44:18 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:128738 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24275 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24275 Kevin Rodgers wrote: > Tim Morley wrote: > > I need to find each record that includes the comment below: > > ... > > If somebody could suggest either an EMACS keyboard macro, or possibly a > > SED or AWK script, that would spit out a text file containing all of the > > above records from my collection of files, it would be a great help > to me. > > I think awk is the way to go: > > awk '/^#/ {comment[c++] = $0} > /^# FAKVORTO: MATEMATIKA/ {verify = 1} > /^msgid/ {msgid = $0} > /^msgstr/ {if (verify == 1) { > for (l=0; l print comment[l] > print msgid > print > } > c = 0 > verify = 0}' > Sterling work, sir! Thanks aplenty for that. All strings now extracted and winging their way to our experts. :o) Somebody buy that man a beer. Tim