batch command
Use this command to execute one or more CLI commands that are contained in a file.
Note
- Comment lines in the batch file begin with a #.
- When running a batch file, commands that fail are returned along with a failure return code.
- Batch file commands that contain unrecognized command options might generate warnings.
- Commands that do not return ‘ok’ will be marked as errors.
Syntax:
batch [-options]
Option | Description | Values |
---|---|---|
-f | Batch file name | Valid file name |
-ip | IP address of TFTP/SFTP server | Valid IP address |
-pn | Port number of TFTP/SFTP server | Valid port number (default 69/22) |
-u | Username for SFTP server | Valid user name |
-pw | Password for SFTP server | Valid password |
-verbose | Print count of commands returning in total/error/warning Note informational commands are counted as errors |
Example:
system> batch -f /home3/lining29/batch -ip 10.240.218.90 -pn 22 -u lining29 -pw 123456
1. vpd comp
FRU Name PN/SKU SN/PPIN Status
-------- ------ ------- ------
FIO SR27B86874 N/A PRSENT
CPU_2 30439450 0DD461420F101656 PRSENT
CPU_1 30439450 0DD431C2282F5178 PRSENT
2. info -name name
ok
3. tls -min 1.3
ok
system> batch -f /home3/lining29/batch -ip 10.240.218.90 -pn 22 -u lining29 -pw 123456 -verbose
1. vpd comp
FRU Name PN/SKU SN/PPIN Status
-------- ------ ------- ------
FIO SR27B86874 N/A PRSENT
CPU_2 30439450 0DD461420F101656 PRSENT
CPU_1 30439450 0DD431C2282F5178 PRSENT
2. info -name name
ok
3. tls -min 1.3
ok
Command total/errors/warnings: 3 / 1 / 0
Give documentation feedback