Is there a way to stack two commands in a single line via the CLI (like dis port then en port)?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-16-2017 08:25 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-17-2017 04:21 AM
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!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-16-2017 08:31 PM
Thanks Patrick... Just looking through CLI and found that command!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-16-2017 08:29 PM
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.
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-16-2017 08:29 PM
The script is local to the switch. If running 21 or later, you could achieve the same remotely through jsonrpc.