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



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.

The tcllib library ships as a standard part of the ActiveState
ActiveTcl distribution, so that's likely the best place to get
everything all at once. Or, if you'd like, you can download the
library separately from http://tcllib.sourceforget.net .

Jeff


.



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)
  • 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: Core commands as ensembles...
    ... command that does much the same as [namespace code], ... TCL as their scripting/console engine. ... home-brew bits and pieces, in which I will use TCL in any way that I ...
    (comp.lang.tcl)
  • Re: Can Ruby read emails?
    ... command, and Ruby will read it and exacute that command. ... I actually wrote a system using Tcl some years back which used ... e-mail to "move" a software agent from one host to another. ...
    (comp.lang.ruby)
  • Re: ANNOUNCE: tcgd - modern, nearly feature-complete interface to gd-2 graphics drawing
    ... This style of Tcl_Obj management is something that some Tcl core developers ... Tcl_Obj command might work better, ... Hmm, Itcl incremements an integer, "unique", for each object generated ... until it finds an command name that doesn't exist, though, wraparound ...
    (comp.lang.tcl)