Basic CLI Command Reference
64 Basic System Configuration Guide
Description This command executes the contents of a text file as if they were CLI commands entered at the console.
Exec commands do not have no versions.
Related Commands:
boot-bad-exec: Use this command to configure a URL for a CLI script to exec following a failed
configuration boot.
boot-good-exec: Use this command to configure a URL for a CLI script to exec following a successful
configuration boot.
Parameters -echo — Echo the contents of the exec file to the session screen as it executes.
Default Echo disabled.
-syntax — Perform a syntax check of the file without executing the commands. Syntax checking
will be able to find invalid commands and keywords, but it will not be able to validate
erroneous user- supplied parameters.
Default Execute file commands.
filename — The text file with CLI commands to execute.
<< — Stdin can be used as the source of commands for the exec command. When stdin is used as
the exec command input, the command list is terminated with <Ctrl-C>, “EOF<Return>” or
“eof_string<Return>”.
If an error occurs entering an exec file sourced from stdin, all commands after the command
returning the error will be silently ignored. The exec command will indicate the command
error line number when the stdin input is terminated with an end-of-file input.
eof_string — The ASCII printable string used to indicate the end of the exec file when stdin is used
as the exec file source. <Ctrl-C> and “EOF” can always be used to terminate an exec file
sourced from stdin.
Default <Ctrl-C>, EOF
exit
Syntax exit [all]
Context <global>
Description This command returns to the context from which the current level was entered. For example, if you
navigated to the current level on a context by context basis, then the exit command only moves the
cursor back one level.
A:ALA-1# configure
A:ALA-1>config# router
A:ALA-1>config>router# ospf
A:ALA-1>config>router>ospf# exit
A:ALA-1>config>router# exit
A:ALA-1>config# exit