Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unix sh-command in tcl

430 views
Skip to first unread message

sam vick

unread,
Jul 5, 2006, 5:54:24 PM7/5/06
to
Hi,

I want to use (execute) a unix command e.g. 'cp <filename> <dir>' inside the
tcl script. Like in perl, is there any command in tcl that helps running the
unix command from inside the tcl-script.

Thanks in advance.

vic


Glenn Jackman

unread,
Jul 5, 2006, 5:59:20 PM7/5/06
to
At 2006-07-05 05:54PM, sam vick <sam...@hotmail.com> wrote:
> Hi,
>
> I want to use (execute) a unix command e.g. 'cp <filename> <dir>' inside the
> tcl script. Like in perl, is there any command in tcl that helps running the
> unix command from inside the tcl-script.

http://wiki.tcl.tk/exec

But, like perl, you'll find that most of what you can do in the shell
you can do in Tcl using Tcl commands.

--
Glenn Jackman
Ulterior Designer

Michael A. Cleverly

unread,
Jul 5, 2006, 8:16:05 PM7/5/06
to

Such as:

file copy $filename $dir

in this instance.

Michael

0 new messages