Thanks - Both actiually work, it is nice to have a couple of examples, makes learning tcl much easier. I would be interested in your comments regarding best books, internet resources, comparison to AWK as a scripting tool, TclPro ....
Awks better for fast and dirty processing and for
convenience you can't beat things like:
Code:
awk ' {var += $3} END {printf "Sum total is %d\n", int(var)}'
In tcl you'd have to split the columns manually, then
aggregate the numbers in an array or list, then sum
them up using expr. Bleah.
If you are a linux guy you may want to take a look
at the old xconfig script for selecting options to
recompile your kernel.
There were some incredible hacks in that script
using tcl,sed and awk.
As far as event oriented programming, easy socket
programming, Gui dev, etc..TCL is one of the coolest
and simplest languages to use and learn.
The best source for tcl is the wiki:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.