If you are running Linux you can use Freewrap to compile tcl. If your distribution doesn't have it in it's repository download it from http://sourceforge.net/projects/freewrap/ and just pass the name of your tcl script as the argument like this:
freewrap <name>.tcl
This should generate the file <name>
, which you can run as any executable. See http://wiki.tcl.tk/855 for other options.
To compile shell scripts use shc
. The tool can be downloaded from http://linux.softpedia.com/get/System/Shells/shc-18503.shtml and you compile your shell script with the command
shc -f <name>
This should output two files <name>.x
and <name>.x.c
. The former is the executable you want and the other is a C code file compiled from your original script that is used to generate the executable.