Celestica Documentation Portal

Find your product documents here

Advanced Commands

Execute file

Executes the commands from the file.

Syntaxexec-file <file-path> [stop-on-error]
Command mode EXEC
Parameters
  • <file-path> - Absolute file path.
  • stop-on-error - Stops the execution when an error is encountered.
Usage File shall be available in the mgmt-framework container.
Supported Releases 1.0.0 or later
Click commandNone
Example
root@sonic:/# cat /tmp/1.txt
configure terminal
interface Vlan 10
description "Vlan 10"
no description
no interface Vlan 10
root@sonic:/#

sonic# exec-file /tmp/1.txt
sonic# configure terminal
sonic(config)# interface Vlan 10
sonic(conf-if-Vlan10)# description "Vlan 10"
sonic(conf-if-Vlan10)# no description
sonic(conf-if-Vlan10)# no interface Vlan 10
sonic(config)#