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



Charles Russell wrote:
Bruce Hartweg 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.
<snip>
What is the command
syntax to test my tcllib installation by invoking, for example,
fileutil::cat under tclsh?

see the man page for package, but it is simply

package require fileutil
fileutil::cat $file

Thanks. I evidently have a corrupted installation or configuration:

$ tclsh
% package require fileutil
can't find package fileutil

I don't think you have a corrupted installation, simply you don't have
tcllib installed.


I need tcllib to run under cygwin, which is not one of the platforms
supported by activestate. tcl/tk is running fine, so the fix is
probably simple, but I am an absolute beginner, so I'll try to get help
from the cygwin mailing list.

Normally on windows I'd strongly recommend running Tcl native by
installing the Activestate distro but I guess you have good reasons for
using cygwin. In which case you can download Tcllib from sourceforge:
http://tcllib.sourceforge.net/

To install tcllib simply untar it and do the usual ./configure; make
install (or run the installer.tcl script, in any case read the
INSTALL.txt file). You may need to change --prefix if you have tcl
installed in strange places.

.



Relevant Pages

  • Re: Tcl application deployment
    ... installation (somehow associating the base pack to the kits ... windows association mechanism is just not powerful enough. ... :> tcl vfs or any other way to load them directly from starkit/zip archive. ... Having base kit as interpreter for apps solves ...
    (comp.lang.tcl)
  • Re: tcl in Fedora
    ... For instance, in the past, one of the regular attendees at tcl ... I've been actively adding various Tcl packages to Fedora Extras, the official add-on repository for Fedora. ... Other extensions that have been added by others include: ...
    (comp.lang.tcl)
  • Re: tcl in Fedora (was: Re: tcl in Ubuntu)
    ... For instance, in the past, one of the regular attendees at tcl ... I've been actively adding various Tcl packages to Fedora Extras, the official add-on repository for Fedora. ... Other extensions that have been added by others include: ...
    (comp.lang.tcl)
  • Re: Install Tcl/Tk locally on Unix
    ... but I'm having problems overriding the version of Tcl that my ... Prepend my local installation directory to my PATH ... (replace tclsh with tclsh8.whatever, if there isn't a tclsh in that ...
    (comp.lang.tcl)
  • Re: Help: After installing tcl8.5.2, the expect "Cant find Expect library"
    ... I got the error of "Can't find package Expect" while executing ... This happened after I installing TCL8.5.2 over TCL 8.4. ... so Expect is probably missing from the installation. ... the old lib/ directory in your script. ...
    (comp.lang.tcl)