Posted on October 8, 2020 4:23 am
 |  Asked by Keith Alemu
 |  77 views
RESOLVED
0
0
Print Friendly, PDF & Email

Is there a way to execute multiple CLI commands on one line? In bash mode, you can use the semicolon in between commands to accomplish this.

0
Answered on October 8, 2020 4:31 am

Hi Keith,

Thanks for reaching out.

Executing multiple CLI commands on one line can be achieved by the following syntax from 4.24.2F EOS version :

run <command1> ; <command2> ; <command3>

For Example:

switch(config)#run show ip interface brief ; show lldp neighbor
#show ip interface brief
Address
Interface                    IP Address                Status     Protocol       MTU   Owner
-------------------- ---------------------- ------------ -------------- ---------- -------
Ethernet25                    unassigned                   up             up             1500
Ethernet25.400           192.168.2.24/24          up              up            1500
Ethernet26                    192.168.4.2/24            up              up            1500
Vlan10                            10.10.10.1/24               up              up            1500

#show lldp neighbor
Last table change time : 15:00:41 ago
Number of table inserts : 36
Number of table deletes : 32
Number of table drops : 0
Number of table age-outs : 23

Port Neighbor Device ID Neighbor Port ID TTL
---------- ----------------------------------------- ---------------------- ---
Et1      switch2                       Ethernet1              120
Et26   switch3                       Ethernet26           120

 

You can refer to the following TOI for configuration commands and for Limitations:

https://eos.arista.com/eos-4-24-2f/multi-command/

 

Thanks,

Bhavana.

Post your Answer

You must be logged in to post an answer.