Name

exec

exec [options] arg [tag...]

Execute arguments as one or more shell commands. Return standard output from the last command in the pipeline.

Options

-keepnewline

Keep trailing newline at end of command pipeline’s output.

- -

Marks end of options (useful for commands that may start with a dash).

Command arguments can include these special symbols:

|

Separate commands in pipeline.

|&

Pipe standard out and standard error.

> filename

Use filename as standard input for command.

<@ fileId

Use fileId (from open command) as standard input.

<< value

Pass immediate value as standard input.

> filename

Redirect standard output to file.

2> filename

Redirect standard error to file.

>& filename

Redirect standard error and standard output to file.

>> filename

Append standard output to file.

2>> filename

Append standard error to file.

>>& filename

Append standard error and standard output to file.

>@ fileId

Redirect standard output to fileId.

2>@ fileId

Redirect standard error to fileId.

>&@ fileId

Redirect standard error and standard output to fileId.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.