From: Wybo Dekker <wybo@servalys.nl>
Cc: ntg-context@ntg.nl
Subject: Re: getting context's version
Date: Tue, 17 Sep 2002 23:20:42 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.42.0209172317420.2858-100000@servalys.nl> (raw)
In-Reply-To: <20020917202829.095afd5a.taco@elvenkind.com>
On Tue, 17 Sep 2002, Taco wrote:
>
>
> 4 hele regels code, ik schaam me.
>
> groetjes, Taco
>
> #!/usr/bin/perl -w
> local $/;
> open(IN,`kpsewhich context.tex`) || die "can't find context.tex";
> <IN> =~ /contextversion\{(\d+)\.(\d+)\.(\d+)\}/;
> print "version=" . sprintf("%4d%02d%02d",$1,$2,$3) . "\n";
That's better, thanks.
But it slurps the whole file, so I made it:
#!/usr/bin/perl -w
open(IN,`kpsewhich context.tex`) or die "can't find context.tex";
while(<IN>) {
/contextversion\{(\d+)\.(\d+)\.(\d+)\}/ and
printf("version=%4d%02d%02d\n",$1,$2,$3),last;
}
--
Wybo
prev parent reply other threads:[~2002-09-17 21:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-17 10:07 Wybo Dekker
2002-09-17 18:00 ` Tobias Burnus
2002-09-17 18:23 ` Wybo Dekker
2002-09-18 6:57 ` Hans Hagen
2002-09-18 8:41 ` Tobias Burnus
2002-09-18 8:59 ` Wybo Dekker
2002-09-18 9:17 ` Tobias Burnus
2002-09-18 9:47 ` Taco Hoekwater
2002-09-18 15:28 ` Wybo Dekker
2002-09-19 18:41 ` Simon Pepping
2002-09-20 8:06 ` Taco Hoekwater
2002-05-20 8:56 ` Hans Hagen
2002-09-20 9:32 ` Tobias Burnus
2002-05-20 14:42 ` Hans Hagen
2002-09-20 17:55 ` Henning Hraban Ramm
2002-09-21 17:29 ` Simon Pepping
2002-09-18 9:43 ` Taco Hoekwater
2002-09-17 18:28 ` Taco
2002-09-17 21:20 ` Wybo Dekker [this message]
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=Pine.LNX.4.42.0209172317420.2858-100000@servalys.nl \
--to=wybo@servalys.nl \
--cc=ntg-context@ntg.nl \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).