betontalpfa
betontalpfa

Reputation: 3752

What is tclsh's equivalent of bash's -c (run command)?

I need something similar:

$ tclsh --run-command puts hello

to print out: hello.

Like -c in bash.

Upvotes: 0

Views: 40

Answers (1)

betontalpfa
betontalpfa

Reputation: 3752

The simplest is to create a TCL script: runner.tcl with the following content:

#runner.tcl

eval $argv

Use:

$ tclsh runner.tcl puts hello

Upvotes: 0

Related Questions