banner motd
command with non-interactive
mode
The use of escape characters allows the banner motd
command to be used in non-interactive mode
for multiple message lines. In non-interactive mode, you can create
a banner message enclosed in double quotes or other delimiter that
uses escape characters within the delimiters. Other existing CLI commands
do not support the escape characters. For more information on interactive
and non-interactive mode, see Enabling and disabling CLI interactive command mode in this guide.
Character |
|
---|---|
\" |
double quote |
\’ |
single quote |
\` |
forward quote |
\\ |
backslash |
\f |
form feed |
\n |
newline |
\r |
carriage return |
\t |
horizontal tab |
\v |
vertical tab |
Configuring the banner message using escape characters within double quote delimiters
switch(config)# banner motd "You can use the \’banner motd\’ CLI command in non-interactive mode.\n\n\tThe banner motd command will support escape characters." switch(config)# show banner motd Banner Information Banner status: Enabled Configured Banner: You can use the ‘banner motd’ CLI command in non-interactive mode. The banner motd command will support escape characters."
The running configuration file with banner motd configured in non-interactive mode
switch(config)# show running-config Running configuration: ;J8693A Configuration Editor; Created on release #K.15.10.0002 ;Ver #01:01:00 hostname "switch" vlan 1 name "DEFAULT_VLAN" untagged 1-48, a1-a4 ip address dhcp-bootp exit banner motd "You can use the \’banner motd\’ CLI command in non-interactive mode.\n\n\tThe banner motd command will support escape characters."
Configuring the banner message using an alternate delimiter of ‘#’
switch(config)# banner motd #
Enter TEXT message.
End with the character ‘#’.
You can use the banner motd
CLI command in non-interactive mode. The banner motd
command \n\n\t
will support escape characters
#.