From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: PO-mode help, please
Date: Tue, 22 Feb 2005 12:51:23 -0700 [thread overview]
Message-ID: <381gpvF5gbnrbU1@individual.net> (raw)
In-Reply-To: <B9lSd.250$fb4.25@newsfe3-gui.ntli.net>
Tim Morley (forstreku la legoman koloron de mia retadreso) wrote:
> I need to find each record that includes the comment below:
> # FAKVORTO: MATEMATIKA
> msgid "Absolute Value"
> msgstr "Absoluta Valoro"
>
> It may appear as one of several comments, in which case I need to copy
> over all of the comments:
> # Aux ALD (laux la franca AJT)? (Gian Piero SAVIO, 2004-04-02)
> # 'ALDONI' estas plej klara; 'ALD' iom malpli, do konservu la unuan.
> (Tim Morley, 2004-04-03)
> # FAKVORTO: MATEMATIKA
> msgid "ADD"
> msgstr "ALDONI"
>
> And the comments may not appear in any particular order:
> # Nur la franca uzas verban terminon, cxiuj aliaj uzas substantivan
> terminon. Atentu, "Combine" povus havi aritmetikan signifon, kies
> preciza traduko estas "Kombinacio" (mi intertempe kontrolis en PIV1).
> (Leo DC, 2004-08-13)
> # Vi pravas, ke estas cxiutaga kaj matematika sencoj por tiu vorto.
> Mi enmetos ambaux. (Tim Morley, 2004-09-23)
> # FAKVORTO: MATEMATIKA
> # PLURSENCAJXO
> # Kombinajxo
> msgid "Combination"
> msgstr "Kunigado"
>
> 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<c; l++)
print comment[l]
print msgid
print
}
c = 0
verify = 0}'
--
Kevin Rodgers
next prev parent reply other threads:[~2005-02-22 19:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-21 13:15 PO-mode help, please Tim Morley (forstreku la legoman koloron de mia retadreso)
2005-02-22 19:51 ` Kevin Rodgers [this message]
2005-02-22 22:44 ` Tim Morley (forstreku la legoman koloron de mia retadreso)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=381gpvF5gbnrbU1@individual.net \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.