Re: is tcl a reasonable alternative to unix shell scripts?



Arnulf Wiedemann wrote:
Charles Russell wrote:

Jeff Godfrey wrote:
I note that python and ruby have equivalents to the unix "find"
command, but I cannot find on skimming the tcl documentation that it
has a good set of tools for manipulating the file system.
Hi Charles,

Tcl has a library of "common" functions and utilities known as
"tcllib". While it's not part of the "core" of tcl, it's readily
available and easy to load and use. Among (many) other things, that
library contains a module named "fileutil", which in turn contains
"fileutil::find" - which is a Tcl variation of the Unix "find"
command.

That said, the Tcl core does contain *many* file (and filesystem)
related commands, most of which are collected under the "file"
ensemble command. So, check out "file" and its many sub-commands in
the standard Tcl man-pages for most of the built-in file support, and
take a look at the "fileutil" module of tcllib for other (mostly)
higher-level file utilities.

I'm using cygwin with bash console interface (X-windows not installed),
mostly for fortran console applications. The cygwin distribution of
tcl/tk (tk seems to work even without X-windows!) does not include
tcllib, so I got the sourceforge distribution and followed the
installation instructions. However, the tutorials I have found do not
explain how to load and invoke packages. What is the command syntax to
test my tcllib installation by invoking, for example, fileutil::cat
under tclsh?

Did you also download the Tcl documentation package from activestate?

Arnulf

Activestate does not appear to support cygwin, but I have a functioning tcl/tk distribution from cygwin. I have tcl and tcllib documentation from Sourceforge and several tcl tutorials from the web. Unfortunately, none of the tutorials seem to cover use of external libraries, and it is hard for a beginner to find and understand the relevant parts of the manpages.
.



Relevant Pages

  • ANN: AOLserver 4.5.0 released!
    ... On behalf of the AOLserver Team, I have the honor of announcing the ... AOLserver 4.5.0 is a major upgrade including several new Tcl commands, ... AOLserver is America Online's Open-Source web server. ... the "ns_zlib" command for compressing and uncompressing ...
    (comp.lang.tcl)
  • Re: is tcl a reasonable alternative to unix shell scripts?
    ... Tcl has a library of "common" functions and utilities known as "tcllib". ... That said, the Tcl core does contain *many* file related commands, most of which are collected under the "file" ensemble command. ... So, check out "file" and its many sub-commands in the standard Tcl man-pages for most of the built-in file support, and take a look at the "fileutil" module of tcllib for other higher-level file utilities. ...
    (comp.lang.tcl)
  • Tcl-URL! - weekly Tcl news and links (Mar 5)
    ... GRIDPLUS2 is a Tile based version of GRIDPLUS. ... *) New "gpselect" command to select a tablelist row or tree node. ... Some people take their license issues very personal indeed;-) (and ... Word documents via Tcl and tcom - ...
    (comp.lang.tcl)
  • Re: is tcl a reasonable alternative to unix shell scripts?
    ... command, but I cannot find on skimming the tcl documentation that it has a good set of tools for manipulating the file system. ... Tcl has a library of "common" functions and utilities known as "tcllib". ... So, check out "file" and its many sub-commands in the standard Tcl man-pages for most of the built-in file support, and take a look at the "fileutil" module of tcllib for other higher-level file utilities. ... The cygwin distribution of tcl/tk does not include tcllib, so I got the sourceforge distribution and followed the installation instructions. ...
    (comp.lang.tcl)
  • Re: is tcl a reasonable alternative to unix shell scripts?
    ... command, but I cannot find on skimming the tcl documentation that it ... Tcl has a library of "common" functions and utilities known as ... test my tcllib installation by invoking, for example, fileutil::cat ... Did you also download the Tcl documentation package from activestate? ...
    (comp.lang.tcl)