cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

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

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

Eric_Burke
New Contributor III
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 5

Karthik_Mohando
Extreme Employee
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!

Eric_Burke
New Contributor III
Thanks Patrick... Just looking through CLI and found that command!

Patrick_Voss
Extreme Employee
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.
GTM-P2G8KFN