Users Guide

Table Of Contents
/home/filepath Enter the username and the filepath as follows: batch /home/username/
filename.
config://filepath Enter the filepath.
Default Not configured
Command Mode EXEC
Usage
Information
Use this command to create a batch command file on a remote machine. Copy the command file to the
home directory on your switch. This command executes commands in batch mode. OS10 automatically
commits all commands in a batch file; you do not have to enter the commit command. To display the files
stored in the home directory, enter dir home. To view the files stored in the home directory, use the
dir home command.
Example
batch /home/admin/b.cmd
Jun 26 18:29:12 OS10 dn_l3_core_services[723]: Node.1-Unit.1:PRI:notice
[os10:trap],
%Dell EMC (OS10) %log-notice:IP_ADDRESS_ADD: IP Address add is
successful.
IP 172.17.4.1/24 in VRF:default added successfully
Supported
Releases
10.2.0E or later
Linux shell commands
From the Linux shell, you can run a single command or a series of commands in a batch file.
Linux command examples
Use the -c option to run a single command.
admin@OS10:/opt/dell/os10/bin$ clish -c "show version"
New user admin logged in at session 10
Network Operating System
OS Version: 10.5.2.4
Build Version: 10.5.2.4.215
Build Time: 2021-04-11T21:35:41+0000
System Type: S5248F-ON
Architecture: x86_64
Up Time: 1 day 00:54:13
User admin logged out at session 10
admin@OS10:/opt/dell/os10/bin$
Use the -B option to run a batch file with a series of commands.
Create a batch file for example, batch_cfg.txt with a series of executable commands.
configure terminal
router bgp 100
neighbor 100.1.1.1
remote-as 104
no shutdown
Execute the batch file.
admin@OS10:/opt/dell/os10/bin$ clish -B ~/batch_cfg.txt
New user admin logged in at session 15
Verify the BGP settings configured by the batch file.
admin@OS10:/opt/dell/os10/bin$ clish -c "show running-configuration bgp"
New user admin logged in at session 16
124
Advanced CLI tasks