Patrick
You can ask the package manager, with "dpkg -p tcl". Tcl sets variables
like tcl_version and tcl_patchLevel, so you can do
echo 'puts $tcl_patchLevel' | tclsh
That worked as you described - thanks for the quick reply, I
appreciate it.
Patrick
It's also the result from [package require Tcl] so this would also
work:
echo 'puts [package require Tcl];exit' | tclsh
That will work for any other package on Tcl's default package path
too. Just use the correct package name instead of “Tcl” above. :-)
Donal.
Why hasn't anyone suggested
info patchlevel
?
Donald Arseneau
Concern about those forced to stay on version 7.4 ?
:D
DGP
You know, that's always bugged me! Exaplaining that to admins...
and then its really hard to automate that check...
How hard would it be to add --version or -V ?
% tclsh --version
8.5.8
What is hard about it?
TCLVER=$(echo 'puts [package require Tcl];exit' | tclsh)
>
> How hard would it be to add --version or -V ?
>
> % tclsh --version
> 8.5.8
>
uwe