$FreeBSD$ --- tcl8.4a3/html/UserCmd/tclsh.htm.org Mon Dec 17 01:05:42 2001 +++ tcl8.4a3/html/UserCmd/tclsh.htm Mon Dec 17 01:06:06 2001 @@ -21,7 +21,7 @@

NAME

tclsh - Simple shell containing Tcl interpreter

SYNOPSIS

-tclsh ?fileName arg arg ...?
+tclsh8.4 ?fileName arg arg ...?

DESCRIPTION

Tclsh is a shell-like application that reads Tcl commands from its standard input or from a file and evaluates them. @@ -46,7 +46,7 @@ case, but the script file can always source it if desired.

If you create a Tcl script in a file whose first line is -

#!/usr/local/bin/tclsh
+
#!/usr/local/bin/tclsh8.4
then you can invoke the script file directly from your shell if you mark the file as executable. This assumes that tclsh has been installed in the default @@ -60,7 +60,7 @@ following three lines:
#!/bin/sh
 # the next line restarts using tclsh \
-exec tclsh "$0" "$@"
+exec tclsh8.4 "$0" "$@" This approach has three advantages over the approach in the previous paragraph. First, the location of the tclsh binary doesn't have to be hard-wired into the script: it can be anywhere in your shell