This article explains how to auto load and commit large set format commands via the shell script.
Example: Load and commit the following set format commands:
set routing-option static route 192.168.1.1 next-hop 1.1.1.1 set routing-option static route 192.168.1.2 next-hop 1.1.1.1 set routing-option static route 192.168.1.3 next-hop 1.1.1.1 set routing-option static route 192.168.1.4 next-hop 1.1.1.1 ...
Make a file under /var/tmp directory in your SRX device:
% cd /cf/var/tmp % pwd /cf/var/tmp % touch set_commands.txt
Paste the above set format commands into file set_commands.txt and save:
% vi set_commands.txt
File the following shell script under /cf/var/tmp:
% cat configure_commit.sh #!/bin/sh echo "configure `cat set_commands.txt` commit" | /usr/sbin/cli
% chmod u+x ./configure_commit.sh
Run the shell script:
% sh ./configure_commit.sh