Hi!
What operating system do you use?
It looks like your shell script can't call tar to unpack the tar file in /tmp .
Tcl itself can process tar files using the tcllib package.
If you wanted to rewrite the shell script using Perl, I would install Archive::Tar