neulab/tldr huggingface dataset:
-L     When no -e option is given, don't assume the default action of @MAIN.
-n, --indent nr Indent trace output by nr spaces for each level of call nesting. Using this option makes the program flow visualization easy to follow.  This indents uselessly also functions that never return, such as service functions for throwing exceptions in the C++ runtime.
-o, --output filename Write the trace output to the file filename rather than to stderr.
-p pid Attach to the process with the process ID pid and begin tracing. This option can be used together with passing a command to execute.  It is possible to attach to several processes by passing more than one option -p.
-r     Print a relative timestamp with each line of the trace.  This records the time difference between the beginning of successive lines.
-s strsize Specify the maximum string size to print (the default is 32).
-S     Display system calls as well as library calls
-t     Prefix each line of the trace with the time of day.
-tt    If given twice, the time printed will include the microseconds.
-ttt   If given thrice, the time printed will include the microseconds and the leading portion will be printed as the number of seconds since the epoch.
-T     Show  the  time  spent inside each call. This records the time difference between the beginning and the end of each call.
-u username Run command with the userid, groupid and supplementary groups of username.  This option is only useful when running as root and enables the correct execution of setuid and/or setgid binaries.
-w, --where nr Show backtrace of nr stack frames for each traced function. This option enabled only if libunwind support was enabled at compile time.
-x filter A qualifying expression which modifies which symbol table entry points to trace.  The format of the filter expression is described in the section FILTER EXPRESSIONS.  If more than one -x option appears on the command line, the symbols that match any of them are traced.  No entry points are traced if no -x is given.
-V, --version Show the version number of ltrace and exit.
Filter expression is a chain of glob- or regexp-based rules that are used to pick symbols for tracing from libraries that the process uses.  Most of it is intuitive, so as an example, the following would trace calls to malloc and free, except those done by libc:
-e malloc+free-@libc.so*
This reads: trace malloc and free, but don't trace anything that comes from libc.  Semi-formally, the syntax of the above example looks approximately like this:
{[+-][symbol_pattern][@library_pattern]}
Symbol_pattern is used to match symbol names, library_pattern to match library SONAMEs.  Both are implicitly globs, but can be regular expressions as well (see below).  The glob syntax supports meta- characters * and ? and character classes, similarly to what basic bash globs support.  ^ and $ are recognized to mean, respectively, start and end of given name.
Both symbol_pattern and library_pattern have to match the whole name.  If you want to match only part of the name, surround it with one or two *'s as appropriate.  The exception is if the pattern is not mentioned at all, in which case it's as if the corresponding pattern were *.  (So malloc is really malloc@* and @libc.* is really *@libc.*.)
In libraries that don't have an explicit SONAME, basename is taken for SONAME.  That holds for main binary as well: /bin/echo has an implicit SONAME of echo.  In addition to that, special library pattern MAIN always matches symbols in the main binary and never a library with actual SONAME MAIN (use e.g. ^MAIN or [M]AIN for that).
If the symbol or library pattern is surrounded in slashes (/like this/), then it is considered a regular expression instead.  As a shorthand, instead of writing /x/@/y/, you can write /x@y/.
If the library pattern starts with a slash, it is not a SONAME expression, but a path expression, and is matched against the library path name.
The first rule may lack a sign, in which case + is assumed.  If, on the other hand, the first rule has a - sign, it is as if there was another rule @ in front of it, which has the effect of tracing complement of given rule.
The above rules are used to construct the set of traced symbols.  Each candidate symbol is passed through the chain of above rules.  Initially, the symbol is unmarked.  If it matches a + rule, it becomes marked, if it matches a - rule, it becomes unmarked again.  If, after applying all rules, the symbol is marked, it will be traced.
It has most of the bugs stated in strace(1).
It only works on Linux and in a small subset of architectures.
If you would like to report a bug, send a message to the mailing list (ltrace-devel@lists.alioth.debian.org), or use the reportbug(1) program if you are under the Debian GNU/Linux distribution.
/etc/ltrace.conf System configuration file
~/.ltrace.conf Personal config file, overrides /etc/ltrace.conf
Juan Cespedes <cespedes@debian.org> Petr Machata <pmachata@redhat.com>
ltrace.conf(5), strace(1), ptrace(2)
CLANG(1)                              Clang                             CLANG(1)
clang [options] filename ...
Preprocessing This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives.  The output of this stage is typically called a ".i" (for C), ".ii" (for C++), ".mi" (for Objective-C), or ".mii" (for Objective-C++) file.
Parsing and Semantic Analysis This stage parses the input file, translating preprocessor tokens into a parse tree.  Once in the form of a parse tree, it applies semantic analysis to compute types for expressions as well and determine whether the code is well formed. This stage is responsible for generating most of the compiler warnings as well as parse errors. The output of this stage is an "Abstract Syntax Tree" (AST).
Code Generation and Optimization This stage translates an AST into low-level intermediate code (known as "LLVM IR") and ultimately to machine code.  This phase is responsible for optimizing the generated code and handling target-specific code generation.  The output of this stage is typically called a ".s" file or "assembly" file.
Assembler This stage runs the target assembler to translate the output of the compiler into a target object file. The output of this stage is typically called a ".o" file or "object" file.
Linker This stage runs the target linker to merge multiple object files into an executable or dynamic library. The output of this stage is typically called an "a.out", ".dylib" or ".so" file.
The Clang Static Analyzer is a tool that scans source code to try to find bugs through code analysis.  This tool uses many parts of Clang and is built into the same driver.  Please see <https://clang-analyzer.llvm.org> for more details on how to use the static analyzer.
Stage Selection Options -E     Run the preprocessor stage.
-S     Run the previous stages as well as LLVM generation and optimization stages and target-specific code generation, producing an assembly file.
-c     Run all of the above, plus the assembler, generating a target ".o" object file.
Language Selection and Mode Options -x <language> Treat subsequent input files as having type language.
-std=<standard> Specify the language standard to compile for.
Supported values for the C language are: c89 c90 iso9899:1990
ISO C 1990 iso9899:199409
ISO C 1990 with amendment 1 gnu89 gnu90
ISO C 1990 with GNU extensions c99 iso9899:1999
ISO C 1999 gnu99
ISO C 1999 with GNU extensions c11 iso9899:2011
ISO C 2011 gnu11
ISO C 2011 with GNU extensions c17 iso9899:2017
ISO C 2017 gnu17
ISO C 2017 with GNU extensions
The default C language standard is gnu11, except on PS4, where it is gnu99.
Supported values for the C++ language are: c++98 c++03
ISO C++ 1998 with amendments gnu++98 gnu++03
ISO C++ 1998 with amendments and GNU extensions c++11
ISO C++ 2011 with amendments gnu++11
ISO C++ 2011 with amendments and GNU extensions c++14
ISO C++ 2014 with amendments gnu++14
ISO C++ 2014 with amendments and GNU extensions c++17
ISO C++ 2017 with amendments gnu++17
ISO C++ 2017 with amendments and GNU extensions c++2a
Working draft for ISO C++ 2020 gnu++2a
Working draft for ISO C++ 2020 with GNU extensions
The default C++ language standard is gnu++14.
Supported values for the OpenCL language are: cl1.0
OpenCL 1.0 cl1.1
OpenCL 1.1 cl1.2
OpenCL 1.2 cl2.0
OpenCL 2.0
The default OpenCL language standard is cl1.0.
Supported values for the CUDA language are: cuda
NVIDIA CUDA(tm)
-stdlib=<library> Specify the C++ standard library to use; supported options are libstdc++ and libc++. If not specified, platform default will be used.
-rtlib=<library> Specify the compiler runtime library to use; supported options are libgcc and compiler-rt. If not specified, platform default will be used.
-ansi  Same as -std=c89.
-ObjC, -ObjC++ Treat source input files as Objective-C and Object-C++ inputs respectively.
-fno-builtin Disable special handling and optimizations of builtin functions like strlen() and malloc().
-flax-vector-conversions, -flax-vector-conversions=<kind>, -fno-lax-vector-conversions Allow loose type checking rules for implicit vector conversions. Possible values of <kind>:
• none: allow no implicit conversions between vectors
• integer: allow implicit bitcasts between integer vectors of the same overall bit-width
• all: allow implicit bitcasts between any vectors of the same overall bit-width
<kind> defaults to integer if unspecified.
-fobjc-nonfragile-abi-version=<version> Select the Objective-C non-fragile ABI version to use by default. This will only be used as the Objective-C ABI when the non-fragile ABI is enabled (either via -fobjc-nonfragile-abi, or because it is the platform default).
-fobjc-nonfragile-abi, -fno-objc-nonfragile-abi Enable use of the Objective-C non-fragile ABI. On platforms for which this is the default ABI, it can be disabled with -fno-objc-nonfragile-abi.
-arch <architecture> Specify the architecture to build for.
-mmacosx-version-min=<version> When building for macOS, specify the minimum version supported by your application.
--print-supported-cpus Print out a list of supported processors for the given target (specified through --target=<architecture> or -arch <architecture>). If no target is specified, the system default target will be used.
-mcpu=?, -mtune=? Aliases of --print-supported-cpus
-march=<cpu> Specify that Clang should generate code for a specific processor family member and later.  For example, if you specify -march=i486, the compiler is allowed to generate instructions that are valid on i486 and later processors, but which may not exist on earlier ones.
Code Generation Options -O0, -O1, -O2, -O3, -Ofast, -Os, -Oz, -Og, -O, -O4 Specify which optimization level to use: -O0 Means "no optimization": this level compiles the fastest and generates the most debuggable code.
-O1 Somewhere between -O0 and -O2.
-O2 Moderate level of optimization which enables most optimizations.
-O3 Like -O2, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster).
-Ofast Enables all the optimizations from -O3 along with other aggressive optimizations that may violate strict compliance with language standards.
-Os Like -O2 with extra optimizations to reduce code size.
-Oz Like -Os (and thus -O2), but reduces code size further.
-Og Like -O1. In future versions, this option might disable different optimizations in order to improve debuggability.
-O Equivalent to -O2.
-O4 and higher Currently equivalent to -O3
-g, -gline-tables-only, -gmodules Control debug information output.  Note that Clang debug information works best at -O0.  When more than one option starting with -g is specified, the last one wins: -g Generate debug information.
-gline-tables-only Generate only line table debug information. This allows for symbolicated backtraces with inlining information, but does not include any information about variables, their locations or types.
-gmodules Generate debug information that contains external references to types defined in Clang modules or precompiled headers instead of emitting redundant debug type information into every object file.  This option transparently switches the Clang module format to object file containers that hold the Clang module together with the debug information.  When compiling a program that uses Clang modules or precompiled headers, this option produces complete debug information with faster compile times and much smaller object files.
This option should not be used when building static libraries for distribution to other machines because the debug info will contain references to the module cache on the machine the object files in the library were built on.
-fstandalone-debug -fno-standalone-debug Clang supports a number of optimizations to reduce the size of debug information in the binary. They work based on the assumption that the debug type information can be spread out over multiple compilation units.  For instance, Clang will not emit type definitions for types that are not needed by a module and could be replaced with a forward declaration.  Further, Clang will only emit type info for a dynamic C++ class in the module that contains the vtable for the class.
The -fstandalone-debug option turns off these optimizations.  This is useful when working with 3rd-party libraries that don't come with debug information.  This is the default on Darwin.  Note that Clang will never emit type information for types that are not referenced at all by the program.
-fexceptions Enable generation of unwind information. This allows exceptions to be thrown through Clang compiled stack frames.  This is on by default in x86-64.
-ftrapv Generate code to catch integer overflow errors.  Signed integer overflow is undefined in C. With this flag, extra code is generated to detect this and abort when it happens.
-fcommon, -fno-common This flag specifies that variables without initializers get common linkage.  It can be disabled with -fno-common.
-ftls-model=<model> Set the default thread-local storage (TLS) model to use for thread-local variables. Valid values are: "global-dynamic", "local-dynamic", "initial-exec" and "local-exec". The default is "global-dynamic". The default model can be overridden with the tls_model attribute. The compiler will try to choose a more efficient model if possible.
-flto, -flto=full, -flto=thin, -emit-llvm Generate output files in LLVM formats, suitable for link time optimization.  When used with -S this generates LLVM intermediate language assembly files, otherwise this generates LLVM bitcode format object files (which may be passed to the linker depending on the stage selection options).
The default for -flto is "full", in which the LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where the linker merges all such modules into a single combined module for optimization. With "thin", ThinLTO compilation is invoked instead.
Driver Options -###   Print (but do not run) the commands to run for this compilation.
-Qunused-arguments Do not emit any warnings for unused driver arguments.
-Wa,<args> Pass the comma separated arguments in args to the assembler.
-Wl,<args> Pass the comma separated arguments in args to the linker.
-Wp,<args> Pass the comma separated arguments in args to the preprocessor.
-Xanalyzer <arg> Pass arg to the static analyzer.
-Xassembler <arg> Pass arg to the assembler.
-Xlinker <arg> Pass arg to the linker.
-Xpreprocessor <arg> Pass arg to the preprocessor.
-o <file> Write output to file.
-print-file-name=<file> Print the full library path of file.
-print-libgcc-file-name Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang_rt.builtins.*.a").
-print-prog-name=<name> Print the full program path of name.
-save-stats, -save-stats=cwd, -save-stats=obj Save internal code generation (LLVM) statistics to a file in the current directory (-save-stats/"-save-stats=cwd") or the directory of the output file ("-save-state=obj").
-integrated-as, -no-integrated-as Used to enable and disable, respectively, the use of the integrated assembler. Whether the integrated assembler is on by default is target dependent.
-time  Time individual commands.
-v     Show commands to run and use verbose output.
Diagnostics Options -fshow-column, -fshow-source-location, -fcaret-diagnostics, -fdiagnostics-fixit-info, -fdiagnostics-parseable-fixits, -fdiagnostics-print-source-range-info, -fprint-source-range-info, -fdiagnostics-show-option, -fmessage-length These options control how Clang prints out information about diagnostics (errors and warnings). Please see the Clang User's Manual for more information.
Preprocessor Options -D<macroname>=<value> Adds an implicit #define into the predefines buffer which is read before the source file is preprocessed.
-U<macroname> Adds an implicit #undef into the predefines buffer which is read before the source file is preprocessed.
-include <filename> Adds an implicit #include into the predefines buffer which is read before the source file is preprocessed.
-I<directory> Add the specified directory to the search path for include files.
-F<directory> Add the specified directory to the search path for framework include files.
-nostdlibinc Do not search the standard system directories for include files, but do search compiler builtin include directories.
CPATH  If this environment variable is present, it is treated as a delimited list of paths to be added to the default system include path list. The delimiter is the platform dependent delimiter, as used in the PATH environment variable.
MACOSX_DEPLOYMENT_TARGET If -mmacosx-version-min is unspecified, the default deployment target is read from this environment variable. This option only affects Darwin targets.
To report bugs, please visit <https://bugs.llvm.org/>.  Most bug reports should include preprocessed source files (use the -E option) and the full output of the compiler, along with information to reproduce.
Maintained by the Clang / LLVM Team (<http://clang.llvm.org>)
2007-2020, The Clang Team
TclX(TCL)                                                              TclX(TCL)
TclX - Extended Tcl: Extended command set for Tcl
This man page contains the documentation for all of the extensions that are added to Tcl 7.4 by Extended Tcl (TclX 7.4a).  These extensions provide extend Tcl's capabilities by adding new commands to it, without changing the syntax of standard Tcl.  Extended Tcl is a superset of standard Tcl and is built alongside the standard Tcl sources.  Extended Tcl has three basic functional areas: A set of new commands, a Tcl shell (i.e. a Unix shell-style command line and interactive environment),  and a user-extensible library of useful Tcl procedures, any of which can be automatically loaded on the first attempt to execute it.
The command descriptions are separated into several sections:
o General Commands
o Debugging and Development Commands
o Unix Access Commands
o File Commands
o TCP/IP Server Access
o File Scanning Commands
o Math Commands
o List Maninipulation Commands
o Keyed Lists
o String and Character Manipulation Commands
o XPG/3 Message Catalog Commands
o Extended Tcl Shell
o Help Facility
o Tcl Loadable Libraries and Packages
A set of general, useful Tcl commands, includes a command to begin an interactive session with Tcl, a facility for tracing execution, and a looping command.
dirs   This procedure lists the directories in the directory stack.
commandloop ?prompt1? ?prompt2? Create an interactive command loop for the current TCL interpreter.  This command receives commands from stdin and executes them.  It is useful TCL scripts that do not normally converse interactively with a user through a Tcl command interpreter, but which sometimes want to enter this mode.
Prompt1 is a Tcl command  that is evaluated to output a prompt string.  The old value of tcl_prompt1 is saved and it is set to this value for the duration of the command loop.  Prompt2 is a command that is evaluated to output the ``downlevel prompt'', which is the prompt which is issued for continuation input.  The old value of tcl_prompt2 is saved and it is set to this value for the duration of the command loop.
When the command terminates, the variables for the prompt hooks will be set to their old value.  If these arguments are not specified, the prompt hooks use their current value.
echo ?str ...? Writes zero or more strings to standard output, followed by a newline.
infox option Return information about Extended Tcl, or the current application. The following infox command options are available:
version Return the version number of Extended Tcl.  The version number for Extended Tcl is generated by combining the base version of the standard Tcl code with a letter indicating the version of Extended Tcl being used.  This is the documentation for version 7.4a.
patchlevel Return the patchlevel for Extended Tcl.
have_fchown Return 1 if the fchown system call is available.  This supports the -fileid option on the chown and chgrp commands.
have_fchmod Return 1 if the fchmod system call is available.  This supports the -fileid option on the chmod command.
have_flock Return 1 if the flock command defined,  0 if it is not available.
have_fsync Return 1 if the fsync system call is available and the sync command will sync individual files.  0 if it is not available and the sync command will always sync all file buffers.
have_ftruncate Return 1 if the ftruncate or chsize system call is available. If it is, the ftruncate command -fileid option maybe used.
have_msgcats Return 1 if XPG message catalogs are available, 0 if they are not.  The catgets is designed to continue to function without message catalogs, always returning the default string.
have_posix_signals Return 1 if Posix signals are available (block and unblock options available for the signal command).  0 is returned if Posix signals are not available.
have_sockets Return 1 if sockets are available (server_* suite and fstat localhost and remotehost options).  0 is returned if sockets are not available.
have_truncate Return 1 if the truncate system call is available.  If it is, the ftruncate command may truncate by file path.
appname Return the symbolic application name of the current application linked with the Extended Tcl library.  The C variable tclAppName must be set by the application to return an application specific value for this variable.
applongname Return a natural language name for the current application. The C variable tclLongAppName must be set by the application to return an application specific value for this variable.
appversion Return the version number for the current application.  The C variable tclAppVersion must be set by the application to return an application-specific value for this variable.
apppatchlevel Return the patchlevel for the current application.  The C variable tclAppPatchlevel must be set by the application to return an application-specific value for this variable.
for_array_keys var array_name code This procedure performs a foreach-style loop for each key in the named array.  The break and continue statements work as with foreach.
for_recursive_glob var dirlist globlist code This procedure performs a foreach-style loop over recursively matched files.  All directories in dirlist are recursively searched (breadth-first), comparing each file found against the file glob patterns in globlist.  For each matched file, the variable var is set to the file path and code is evaluated. Symbolic links are not followed.
loop var first limit ?increment? body Loop is a looping command, similar in behavior to the Tcl for statement, except that the loop statement achieves substantially higher performance and is easier to code when the beginning and ending values of a loop are known, and the loop variable is to be incremented by a known, fixed amount every time through the loop.
The var argument is the name of a Tcl variable that will contain the loop index.  The loop index is set to the value specified by first.  The Tcl interpreter is invoked upon body zero or more times, where var is incremented by increment every time through the loop, or by one if increment is not specified.  Increment can be negative in which case the loop will count downwards.
When var reaches limit, the loop terminates without a subsequent execution of body.  For instance, if the original loop parameters would cause loop to terminate, say first was one, limit was zero and increment was not specified or was non-negative, body is not executed at all and loop returns.
The first, limit and increment are integer expressions.  They are only evaulated once at the beginning of the loop.
If a continue command is invoked within body then any remaining commands in the current execution of body are skipped, as in the for command.  If a break command is invoked within body then the loop command will return immediately.  Loop returns an empty string.
popd This procedure pops the top directory entry from the directory stack and make it the current directory.
pushd ?dir? This procedure pushs the current directory onto the directory stack and cd to the specified directory.  If the directory is not specified, then the current directory is pushed, but remains unchanged.
recursive_glob dirlist globlist This procedure returns a list of recursively matches files.  All directories in dirlist are recursively searched (breadth-first), comparing each file found against the file glob patterns in globlist.  Symbolic links are not followed.
showproc ?procname ...? This procedure lists the definition of the named procedures. Loading them if it is not already loaded.  If no procedure names are supplied, the definitions of all currently loaded procedures are returned.
DEBUGGING AND DEVELOPMENT COMMANDS This section contains information on commands and procdures that are useful for developing and debugging Tcl scripts.
cmdtrace level|on ?noeval? ?notruncate? ?procs? ?fileid? ?command cmd? Print a trace statement for all commands executed at depth of level or below (1 is the top level).  If on is specified, all commands at any level are traced.  The following options are available:
noeval Causes arguments to be printed unevaluated.  If noeval is specified, the arguments are printed before evaluation. Otherwise, they are printed afterwards.
If the command line is longer than 60 characters, it is truncated to 60 and a "..." is postpended to indicate that there was more output than was displayed.  If an evaluated argument contains a space, the entire argument will be enclosed inside of braces (`{}') to allow the reader to visually separate the arguments from each other.
notruncate Disables the truncation of commands and evaluated arguments.
procs  Enables the tracing of procedure calls only.  Commands that aren't procedure calls (i.e. calls to commands that are written in C, C++ or some object-compatible language) are not traced if the procs option is specified.  This option is particularly useful for greatly reducing the output of cmdtrace while debugging.
fileid This is a file id as returned by the open command.  If specified, then the trace output will be written to the file rather than stdout.  A stdio buffer flush is done after every line is written so that the trace may be monitored externally or provide useful information for debugging problems that cause core dumps.
command cmd Call the specified command cmd on when each command is executed instead of tracing to a file.  See the description of the functionally below.  This option may not be specified with a fileid.
The most common use of this command is to enable tracing to a file during the development.  If a failure occurs, a trace is then available when needed.  Command tracing will slow down the execution of code, so it should be removed when code is debugged.  The following command will enable tracing to a file for the remainder of the program:
cmdtrace on [open cmd.log w]
The command option causes a user specified trace command to be called for each command executed.  The command will have the following arguments appended to it before evaluation:
1) command -A string containing the text of the command, before any argument substitution.
2) argv - A list of the final argument information that will be passed to the command after command, variable, and backslash substitution.
3) evalLevel - The Tcl_Eval call level.
4) procLevel - The procedure call level.
The command should be constructed in such a manner that it will work if additional arguments are added in the future.  It is suggested that the command be a proc with the final argument being args.
Tracing will be turned off while the command is being executed.  The values of the errorInfo and errorCode variables will be saved and restored on return from the command.  It is the command's responsibility to preserve all other state.
If an error occurs during the execution of command, an error message is dumped to stderr and the tracing is disabled.  The underlying mechanism that this functionality is built on does not support returning an error to the interpreter.
cmdtrace off Turn off all tracing.
cmdtrace depth Returns the current maximum trace level, or zero if trace is disabled.
edprocs ?proc...? This procedure writes the named procedures, or all currently defined procedures, to a temporary file, then calls an editor on it (as specified by the EDITOR environment variable, or vi if none is specified), then sources the file back in if it was changed.
profile ?-commands? on
profile off arrayVar This command is used to collect a performance profile of a Tcl script.  It collects data at the Tcl procedure level. The number of calls to a procedure, and the amount of real and CPU time is collected. Time is also collected for the global context.  The procedure data is collected by bucketing it based on the procedure call stack, this allows determination of how much time is spent in a particular procedure in each of it's calling contexts.
The on option enables profile data collection. If the -commands option is specifed, data on all commands within a procedure is collected as well a procedures.  Multiple occurrences of a command within a procedure are not distinguished, but this data may still be useful for analysis.
The off option turns off profiling and moves the data collected to the array arrayVar.  The array is address by a list containing the procedure call stack.  Element zero is the top of the stack, the procedure that the data is for.  The data in each entry is a list consisting of the procedure call count and the real time and CPU time in milliseconds spent in the procedure (and all procedures it called). The list is in the form {count real cpu}.  A Tcl procedure profrep is supplied for reducing the data and producing a report
profrep profDataVar sortKey ?outFile? ?userTitle? This procedure generates a report from data collect from the profile command.  ProfDataVar is the name of the array containing the data returned by the profile command. SortKey indicates which data value to sort by.  It should be one of "calls", "cpu" or "real".  OutFile is the name of file to write the report to.  If omitted, stdout is assumed.  UserTitle is an optional title line to add to output.
saveprocs fileName ?proc...? This prodcure saves the definition of the named procedure, or all currently defined procedures if none is specified, to the named file.
These commands provide access to many basic Unix facilities, including process handling, date and time processing, signal handling and the executing commands via the shell.
alarm seconds Instructs the system to send a SIGALRM signal in the specified number of seconds.  This is a floating point number, so fractions of a section may be specified.  If seconds is 0.0, any previous alarm request is canceled.  Only one alarm at a time may be active; the command returns the number of seconds left in the previous alarm.  On systems without the setitimer system call, seconds is rounded up to an integer number of seconds.
convertclock dateString ?GMT|{}? ?baseClock? Convert dateString to an integer clock value (see getclock).  This command can parse and convert virtually any standard date and/or time string, which can include standard time zone mnemonics.  If only a time is specified, the current date is assumed.  If the string does not contain a time zone mnemonic, the local time zone is assumed, unless the GMT argument is specified, in which case the clock value is calculated assuming that the specified time is relative to Greenwich Mean Time.
If baseClock is specified, it should contain an integer clock value.  Only the date in this value is used, not the time.  This is useful for determining the time on a specific day or doing other date-relative conversions.
The character string consists of zero or more specifications of the following form:
time - A time of day, which is of the form hh[:mm[:ss]] [meridian] [zone] or hhmm [meridian] [zone].  If no meridian is specified, hh is interpreted on a 24-hour clock.
date - A specific month and day with optional year.  The acceptable formats are mm/dd[/yy], monthname dd[, yy], dd monthname [yy], and day, dd monthname yy.  The default year is the current year.  If the year is less then 100, then 1900 is added to it.
relative time - A specification relative to the current time.  The format is number unit; acceptable units are year, fortnight, month, week, day, hour, minute (or min), and second (or sec).  The unit can be specified as a singular or plural, as in 3 weeks. These modifiers may also be specified: tomorrow, yesterday, today, now, last, this, next, ago.
The actual date is calculated according to the following steps. First, any absolute date and/or time is processed and converted. Using that time as the base, day-of-week specifications are added. Next, relative specifications are used.  If a date or day is specified, and no absolute or relative time is given, midnight is used.  Finally, a correction is applied so that the correct hour of the day is produced after allowing for daylight savings time differences.
convertclock ignores case when parsing all words.  The names of the months and days of the week can be abbreviated to their first three letters, with optional trailing period.  Periods are ignored in any timezone or meridian values.
Note that convertclock will convert symbolic time-zone names, but these are not standardized and there are conflicts with various parts of the world.  Use GMT when trying to produce a portable time that can then be converted back to a numeric value.
The only dates in the range 1902 and 2037 may be converted.  Some examples are:
convertclock "14 Feb 92" convertclock "Feb 14, 1992 12:20 PM PST" convertclock "12:20 PM Feb 14, 1992"
execl ?-argv0 argv0? prog ?arglist? Do an execl, replacing the current program (either Extended Tcl or an application with Extended Tcl embedded into it) with prog and passing the arguments in the list arglist.
The -argv0 options specifies that argv0 is to be passed to the program as argv [0] rather than prog.
Note: If you are using execl in a Tk application and it fails, you may not do anything that accesses the X server or you will receive a BadWindow error from the X server.  This includes executing the Tk version of the exit command.  We suggest using the following command to abort Tk applications after an execl failure:
kill [id process]
fmtclock clockval ?format? ?GMT|{}? Converts a Unix integer time value, typically returned by getclock, convertclock, or the atime, mtime, or ctime options of the file command, to human-readable form.  The format argument is a string that describes how the date and time are to be formatted. Field descriptors consist of a ``%'' followed by a field descriptor character.  All other characters are copied into the result.  Valid field descriptors are:
%% - Insert a %. %a - Abbreviated weekday name. %A - Full weekday name %b - Abbreviated month name. %B - Full month name. %d - Day of month (01 - 31). %D - Date as %m/%d/%y. %e - Day of month (1-31), no leading zeros. %h - Abbreviated month name. %H - Hour (00 - 23). %I - Hour (00 - 12). %j - Day number of year (001 - 366). %m - Month number (01 - 12). %M - Minute (00 - 59). %n - Insert a new line. %p - AM or PM. %r - Time as %I:%M:%S %p. %R - Time as %H:%M. %S - Seconds (00 - 59). %t - Insert a tab. %T - Time as %H:%M:%S. %U - Week number of year (01 - 52), Sunday is the first day of the week. %w - Weekday number (Sunday = 0). %W - Week number of year (01 - 52), Monday is the first day of the week. %x - Local specific date format. %X - Local specific time format. %y - Year within century (00 - 99). %Y - Year as ccyy (e.g. 1990) %Z - Time zone name.
If format is not specified, "%a %b %d %H:%M:%S %Z %Y" is used.  If GMT is specified, the time will be formated as Greenwich Mean Time. If the argument is not specified or is empty, then the local timezone will be used as defined by the operating environment.
chroot dirname Change root directory to dirname, by invoking the POSIX chroot(2) system call.  This command only succeeds if running as root.
fork Fork the current Tcl process.  Fork returns zero to the child process and the process number of the child to the parent process. If the fork fails, a Tcl error is generated.
If an execl is not going to be performed before the child process does output, or if a close and dup sequence is going to be performed on stdout or stderr, then a flush should be issued against stdout, stderr and any other open output file before doing the fork. Otherwise characters from the parent process pending in the buffers will be output by both the parent and child processes.
Note: If you are forking in a Tk based apllication you must execl before doing any window operations in the child or you will receive a BadWindow error from the X server.
getclock Return the current date and time as a system-dependent integer value.  The unit of the value is seconds, allowing it to be used for relative time calculations.
id options This command provides a means of getting, setting and converting user, group and process ids.  The id command has the following options:
id user ?name?
id userid ?uid? Set the real and effective user ID to name or uid, if the name (or uid) is valid and permissions allow it.  If the name (or uid) is not specified, the current name (or uid) is returned.
id convert userid uid
id convert user name Convert a user ID number to a user name, or vice versa.
id group ?name?
id groupid ?gid? Set the real and effective group ID to name or gid, if the name (or gid) is valid and permissions allow it.  If the group name (or gid) is not specified, the current group name (or gid) is returned.
id groups
id groupids Return the current group access list of the process.  The option groups returns group names and groupids returns id numbers.
id convert groupid gid
id convert group name Convert a group ID number to a group name, or vice versa.
id effective user
id effective userid Return the effective user name, or effective user ID number, respectively.
id effective group
id effective groupid Return the effective group name, or effective group ID number, respectively.
id effective groupids Return all of the groupids the user is a member of.
id host Return the hostname of the system the program is running on.
id process Return the process ID of the current process.
id process parent Return the process ID of the parent of the current process.
id process group Return the process group ID of the current process.
id process group set Set the process group ID of the current process to its process ID.
id host Returns the standard host name of the machine the process is executing on.
kill ?-pgroup ?signal? idlist Send a signal to the each process in the list idlist, if permitted.  Signal, if present, is the signal number or the symbolic name of the signal, see the signal system call manual page.  The leading ``SIG'' is optional when the signal is specified by its symbolic name.  The default for signo is 15, SIGTERM.
If -pgroup is specified, the numbers in idlist are take as process group ids and the signal is sent to all of the process in that process group.  A process group id of 0 specifies the current process group.
link ?-sym? srcpath destpath Create a directory entry, destpath, linking it to the existing file, srcpath.  If -sym is specified, a symbolic link, rather than a hard link, is created.  (The -sym option is only available on systems that support symbolic links.)
mkdir ?-path? dirList Create each of the directories in the list dirList.  The mode on the new directories is 777, modified by the umask.  If -path is specified, then any non-existent parent directories in the specified path(s) are also created.
nice ?priorityincr? Change or return the process priority.  If priorityincr is omitted, the current priority is returned.  If priorityincr is positive, it is added to the current priority level, up to a system defined maximum (normally 19),
Negative priorityincr values cumulatively increase the program's priority down to a system defined minimum (normally -19); increasing priority with negative niceness values will only work for the superuser.
The new priority is returned.
readdir dirPath Returns a list containing the contents of the directory dirPath. The directory entries "." and ".." are not returned.
rmdir ?-nocomplain? dirList Remove each of the directories in the list dirList.  If -nocomplain is specified, then errors will be ignored.
signal action siglist ?command? Specify the action to take when a Unix signal is received by Extended Tcl, or a program that embeds it.  Siglist is a list of either the symbolic or numeric Unix signal (the SIG prefix is optional).  Action is one of the following actions to be performed on receipt of the signal.  To specify all modifiable signals, use `*' (this will not include SIGKILL and SIGSTOP, as they can not be modified).
default - Perform system default action when signal is received (see signal system call documentation).
ignore - Ignore the signal.
error - Generate a catchable Tcl error.  It will be as if the command that was running returned an error.  The error code will be in the form: POSIX SIG signame For the death of child signal, signame will always be SIGCHLD, rather than SIGCLD, to allow writing portable code.
trap - When the signal occurs, execute command and continue execution if an error is not returned by command.  The command will be executed in the global context.  The command will be edited before execution, replacing occurrences of "%S" with the signal name.  Occurrences of "%%" result in a single "%".  This editing occurs just before the trap command is evaluated.  If an error is returned, then follow the standard Tcl error mechanism. Often command will just do an exit.
get - Retrieve the current settings of the specified signals.  A keyed list will be returned were the keys are one of the specified signals and the values are a list cosisting of the action associated with the signal, a 0 if the signal may be delivered (not block) and a 1 if it is blocked. The actions maybe one of `default',`ignore', `error' or `trap.  If the action is trap, the third element is the command associated with the action.  The action `unknown' is returned if a non-Tcl signal handler has been associated with the signal.
set - Set signals from a keyed list in the format returned by the get.  For this action, siglist is the keyed list of signal state. Signals with an action of `unknown' are not modified.
block - Block the specified signals from being received. (Posix systems only).
unblock - Allow the specified signal to be received. Pending signals will not occur. (Posix systems only).
The signal action will remain enabled after the specified signal has occurred.  The exception to this is SIGCHLD on systems without Posix signals.  For these systems, SIGCHLD is not be automatically reenabled.  After a SIGCHLD signal is received, a call to wait must be performed to retrieve the exit status of the child process before issuing another signal SIGCHLD ... command.  For code that is to be portable between both types of systems, use this approach.
Signals are not processed until after the completion of the Tcl command that is executing when the signal is received.  If an interactive Tcl shell is running, then the SIGINT will be set to error, non-interactive Tcl sessions leave SIGINT unchanged from when the process started (normally default for foreground processes and ignore for processes in the background).
sleep seconds Sleep the Extended Tcl process for seconds seconds.
system command Executes command via the system(3) call.  Differs from exec in that system doesn't return the executed command's standard output as the result string, and system goes through the Unix shell to provide wildcard expansion, redirection, etc, as is normal from an sh command line.  The exit code of the command is returned.
sync ?fileId? If fileId is not specified, or if it is and this system does not support the fsync system call, issues a sync system call to flush all pending disk output.  If fileId is specified and the system does support the fsync system call, issues an fsync on the file corresponding to the specified Tcl fileId to force all pending output to that file out to the disk.
If fileId is specified, the file must be writable.  A flush will be issued against the fileId before the sync.
The infox have_fsync command can be used to determine if "sync fileId" will do a sync or a fsync.
times Return a list containing the process and child execution times in the form: utime stime cutime cstime Also see the times(2) system call manual page.  The values are in milliseconds.
umask ?octalmask? Sets file-creation mode mask to the octal value of octalmask.  If octalmask is omitted, the current mask is returned.
unlink ?-nocomplain? filelist Delete (unlink) the files whose names are in the list filelist. If -nocomplain is specified, then errors will be ignored.
wait ?-nohang? ?-untraced? ?-pgroup? ?pid? Waits for a process created with the execl command to terminate, either due to an untrapped signal or call to exit system call.  If the process id pid is specified, they wait on that process, otherwise wait on any child process to terminate.
If -nohang is specified, then don't block waiting on a process to terminate.  If no process is immediately available, return an empty list.  If -untraced is specified then the status of child processes that are stopped, and whose status has not yet been reported since they stopped, are also returned.  If -pgroup is specfied and pid is not specified, then wait on any child process whose process groupd ID is they same as the calling process. If pid is specified with -pgroup, then it is take as a process group ID, waiting on any process in that process group to terminate.
Wait returns a list containing three elements: The first element is the process id of the process that terminated.  If the process exited normally, the second element is `EXIT', and the third contains the numeric exit code.  If the process terminated due to a signal, the second element is `SIG', and the third contains the signal name.  If the process is currently stopped (on systems that support SIGSTP), the second element is `STOP', followed by the signal name.
Note that it is possible to wait on processes to terminate that were create in the background with the exec command.  However, if any other exec command is executed after the process terminates, then the process status will be reaped by the exec command and will not be available to the wait command.
These commands provide extended file access and manipulation.  This includes searching ASCII-sorted data files, copying files, duplicating file descriptors, control of file access options, retrieving open file status, and creating pipes with the pipe system call.  Also linking and unlinking files, setting file, process, and user attributes and truncating files.  An interface to the select system call is available on Unix systems that support it.
It should be noted that Tcl file I/O is implemented on top of the stdio library.  By default, the file is buffered.  When communicating to a process through a pipe, a flush command should be issued to force the data out.  Alternatively, the fcntl command may be used to set the buffering mode of a file to line-buffered or unbuffered.