Rechercher une page de manuel
scotty
Langue: en
Version: July 1997 (mandriva - 01/05/08)
Section: 1 (Commandes utilisateur)
NAME
scotty - A Tcl shell including the Tnm extensions.SYNOPSIS
scotty ?fileName arg arg ...?DESCRIPTION
Scotty is a shell-like application that reads Tcl commands from its standard input or from a file and evaluates them similar to tclsh(1). The main difference between tclsh(1) and scotty is that scotty loads the Tnm(n) extension at startup time and that scotty runs in an event-driven mode while tclsh(1) needs a special command to enable the event loop. Scotty evaluates the commands stored in the files .tnmrc and .tclshrc at startup if these files exist in the home directory of the user.
SCRIPT FILES
If scotty is invoked with arguments then the first argument is the name of a script file and any additional arguments are made available to the script as variables (see below). Instead of reading commands from standard input scotty will read Tcl commands from the named file; scotty will exit when it reaches the end of the file.
If you create a Tcl script in a file whose first line is
- #!/usr/local/bin/scotty3.0.0
An even better approach is to start your script files with the following three lines:
- #!/bin/sh
# the next line restarts using scotty \
exec scotty3.0.0 "$0" "$@"
VARIABLES
Scotty sets the following Tcl variables:- argc
- Contains a count of the number of arg arguments (0 if none), not including the name of the script file.
- argv
- Contains a Tcl list whose elements are the arg arguments, in order, or an empty string if there are no arg arguments.
- argv0
- Contains fileName if it was specified. Otherwise, contains the name by which scotty was invoked.
- tcl_interactive
- Contains 1 if scotty is running interactively (no fileName was specified and standard input is a terminal-like device), 0 otherwise.
PROMPTS
When scotty is invoked interactively it normally prompts for each command with ``% ''. You can change the prompt by setting the variables tcl_prompt1 and tcl_prompt2. If variable tcl_prompt1 exists then it must consist of a Tcl script to output a prompt; instead of outputting a prompt scotty will evaluate the script in tcl_prompt1. The variable tcl_prompt2 is used in a similar way when a newline is typed but the current command isn't yet complete; if tcl_prompt2 isn't set then no prompt is output for incomplete commands.SEE ALSO
Tnm(n), Tcl(n), tclsh(1)AUTHORS
Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de>Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre