3 ms·
> 3) Tcl as alternative of shell script is great, for a number of reasons: from the [glob] command to an [exec] command that is able to mimic a lot of what a sh
by jayferd 15y ago
> 3) Tcl as alternative of shell script is great, for a number of reasons: from the [glob] command to an [exec] command that is able to mimic a lot of what a shell can do. See the Redis unit test for an example of scripting stuff with Tcl.
The thing TCL doesn't have are pipes. Not even Unix pipes, just some way of chaining little blocks together, so that complexity extends rightward, as you type.
- adunsmoor 15y agoWhat do you mean? exec cat /etc/passwd | grep root works just fine. You can also use Tcl's open command with a pipe to do back and forth communication with a subprocess. http://www.tcl.tk/man/tcl/tutorial/Tcl26.html http://www.tcl.tk/man/tcl/tutorial/Tcl26.html
- jayferd 15y agoYes, tcl's `exec` command implements a special syntax for using UNIX pipes, but what I'm referring to is not UNIX pipes, but a language feature - an interactive language needs to implement some kind of pipe/chain/cascade syntax, so you can use the results of a command without having to go back and surround it with parentheses or brackets.