Re: System Command in TCL



Jonathan Bromley schrieb:
On Sat, 07 Jul 2007 18:06:00 -0000, Puneet Maheshwari
<puneetrocks@xxxxxxxxx> wrote:

Does anyone know how to write system commands in TCL. Commands like
tar, copying a folder etc. A tutorial link will be really useful.

For things that have native support in Tcl - like copying
files, creating directories, checking file status, exploring
directory structures - take a close look at the many options
of the [file] command. It has the huge advantage of being
completely independent of the operating system, so your
script can work correctly on Windows, *nix, Mac etc.

For things that Tcl does not do for itself, such as "tar",
There is a tar module in tcllib...
http://tcllib.sourceforge.net/doc/tar.html

lots of other stuff replacing system commands are in tcllib too...

Michael
.



Relevant Pages

  • Re: linked list using Tcl
    ... tanks a lot for ur prompt response .. ... which has mre info abt copying the c code in TcL .. ... all our experience is that "copying ...
    (comp.lang.tcl)
  • Re: Safe Home backups
    ... What I have been doing is "tar -zcvf" and then copying those files to a dvd. ... If on reading it back it does not uncompress you are not burning it right. ... if you are just burning as a backup file the result is most always smaller if you first create an uncompressed tar file and bzip2 the tar file. ...
    (linux.redhat)
  • TCL, UNIX, [exec] and lists
    ... set tarFileName $archivePath/$_[clock scan ... set cannotGzip [catch { ... I am going to take the list $fileList and import it into a UNIX TAR ... TCL knows what it is, ...
    (comp.lang.tcl)
  • TCL, UNIX, [exec] and lists
    ... set tarFileName $archivePath/$_[clock scan ... set cannotGzip [catch { ... I am going to take the list $fileList and import it into a UNIX TAR ... TCL knows what it is, ...
    (comp.os.linux.misc)
  • TCL, UNIX, [exec] and lists
    ... set tarFileName $archivePath/$_[clock scan ... set cannotGzip [catch { ... I am going to take the list $fileList and import it into a UNIX TAR ... TCL knows what it is, ...
    (comp.unix.misc)