OS10 Enterprise Edition User Guide Release 10.4.0E(R3)


Batch mode commands

You can create a batch file to simplify routine or repetitive tasks. A batch file is an unformatted text file that contains two or more commands and has a .cmd file name extension.

You can use vi or any other editor to create the .cmd file, then use the batch command to execute the file. To execute a series of commands in a file in batch mode (non-interactive processing), use the batch command. OS10 automatically commits all commands in a batch file — you do not have to enter the commit command.

  • Create a batch file ( b.cmd) on a remote device by entering a series of commands.
    interface ethernet 1/1/4
                                           no switchport
                                           ip address
                                           no shutdown
  • Copy the command file on the remote device to your switch, such as to your home directory.
    OS10# copy scp://os10user:os10passwd@ home://b.cmd
                                           OS10# dir home
                                           Directory contents for folder: home
                                           Date (modified)        Size (bytes)  Name
                                           ---------------------  ------------  ------------------------------------------
                                           2017-02-15T19:25:35Z   77            b.cmd                                                                           
  • Execute the batch file using the batch command in EXEC mode.
    OS10# batch b.cmd
                                           OS10# Feb 15 19:26:1: %Dell EMC (OS10) %Node.1-Unit.1:PRI:OS10 %log-notice:IP_ADDRESS_ADD: IP Address add is successful.:IP
                                  added successfully
  • (Optional) Verify the new commands in the running configuration.
    OS10# show running-configuration interface ethernet 1/1/4
                                           interface ethernet1/1/4
                                           ip address
                                           no switchport
                                           no shutdown

Rate this content

Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\