Is there a way to stack two commands in a single line via the CLI (like dis port then en port)?


Userlevel 4
Wondering if there is a way to stack two commands in a single line of the EXOS CLI? For example in windows you can issue a "ipconfig /release & ipconfig /renew" in one line and it will execute both commands back to back. I need to cycle a port than I'm actually connected through so I'd like to do the same with a "disable port x | enable port x" type of command. Is this possible? Thanks in advance!

5 replies

Userlevel 6
Hello Eric,

You can utilize the "restart port" command. That should get the job done.

The other option would be to create a script and run it.
Patrick Voss wrote:

Hello Eric,

You can utilize the "restart port" command. That should get the job done.

The other option would be to create a script and run it.

Hello Patrick,

is a script in the case of disable the connected port working? I think the script would stop after the disable command for the e.g. uplink port.

regards Daniel.
Userlevel 7
Patrick Voss wrote:

Hello Eric,

You can utilize the "restart port" command. That should get the job done.

The other option would be to create a script and run it.

The script is local to the switch. If running 21 or later, you could achieve the same remotely through jsonrpc.
Userlevel 4
Thanks Patrick... Just looking through CLI and found that command!
Userlevel 6
Eric, You can also do this. Create a file via CLI with the extension .xsf and you can run that as script. vi test.xsf disable port 1 enable port 1 "to exit press "ESC" and then type !wq "enter" Once done you can run the script "run script test" I hope this can also help!

Reply