You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <ma...@unipr.it> on 2011/09/07 18:18:46 UTC
determining Tcl patchlevel from the shell
admittedly I'm not a great shell programmer. I'm trying to figure out a
way to determine in a m4 macro which patchlevel of Tcl we are compiling
Rivet with by letting tclsh return in a shell variable the output of
[info patchlevel]. We have other examples of Tcl-m4 cooperation but data
go into files, I would like to get the same information into a shell
variable, is there a way to do it?
thanks
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: determining Tcl patchlevel from the shell
Posted by Massimo Manghi <ma...@unipr.it>.
On 09/07/2011 06:29 PM, Ronnie Brunner wrote:
>
>
> something like that?
>
> > /bin/sh
> $ FOO=`echo puts [info patchlevel] | tclsh`
> $ echo $FOO
> 8.5.10
> $
>
I tried a similar approach but didn't 'puts' the output, I simply called
info patchlevel and sent it to tclsh through the pipe....a typical tcl
beginner mistake
thanks for pointing this out.
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: determining Tcl patchlevel from the shell
Posted by Massimo Manghi <ma...@unipr.it>.
On 09/07/2011 06:37 PM, Jeff Lawson wrote:
> Or if you're already using tclconfig/tcl.m4 (part of TEA) and have
> already run TEA_LOAD_TCLCONFIG in your m4 script then you can just
> substitute these two variables:
>
> echo $TCL_VERSION$TCL_PATCH_LEVEL
>
> 8.5.9
>
Yes, we do, but didn't know about the existence of the TCL_PATCH_LEVEL
symbols. Thank you
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: determining Tcl patchlevel from the shell
Posted by Jeff Lawson <je...@bovine.net>.
Or if you're already using tclconfig/tcl.m4 (part of TEA) and have already
run TEA_LOAD_TCLCONFIG in your m4 script then you can just substitute these
two variables:
echo $TCL_VERSION$TCL_PATCH_LEVEL
8.5.9
On Wed, Sep 7, 2011 at 11:29 AM, Ronnie Brunner <ronnie.brunner@netcetera.ch
> wrote:
>
>
> > admittedly I'm not a great shell programmer. I'm trying to figure out a
> > way to determine in a m4 macro which patchlevel of Tcl we are compiling
> > Rivet with by letting tclsh return in a shell variable the output of
> > [info patchlevel]. We have other examples of Tcl-m4 cooperation but data
> > go into files, I would like to get the same information into a shell
> > variable, is there a way to do it?
>
> something like that?
>
> > /bin/sh
> $ FOO=`echo puts [info patchlevel] | tclsh`
> $ echo $FOO
> 8.5.10
> $
>
> hth
> Ronnie
> --
> Ronnie Brunner | ronnie.brunner@netcetera.ch |
> T +41-44-247 79 79 | F +41-44-247 70 75 |
> Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
>
Re: determining Tcl patchlevel from the shell
Posted by Ronnie Brunner <ro...@netcetera.ch>.
> admittedly I'm not a great shell programmer. I'm trying to figure out a
> way to determine in a m4 macro which patchlevel of Tcl we are compiling
> Rivet with by letting tclsh return in a shell variable the output of
> [info patchlevel]. We have other examples of Tcl-m4 cooperation but data
> go into files, I would like to get the same information into a shell
> variable, is there a way to do it?
something like that?
> /bin/sh
$ FOO=`echo puts [info patchlevel] | tclsh`
$ echo $FOO
8.5.10
$
hth
Ronnie
--
Ronnie Brunner | ronnie.brunner@netcetera.ch |
T +41-44-247 79 79 | F +41-44-247 70 75 |
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org