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

How can I print a message after executing an .xsf script?

How can I print a message after executing an .xsf script?

Ali_Askari
New Contributor II
I am given some .xsf scripts that I just load using the
load script scriptName.xsf
The scripts do not print out anything. If possible I'd like to see a message printed after the execution like

Done! Is it possible? It should be very simple but I cannot find any commands which print out messages in the manual. I tried

echo

but it is not supported. Is there a guide to .xsf scripting?
6 REPLIES 6

Jarek
New Contributor II
Hi,

you can also send info to log, like: create log entry "Test string..."

--
Jarek

StephenW
Extreme Employee
Credit goes to Drew C. Place these two lines at the end of your script

set var done "Done!"
show var done

X450G2-48p-G4.16 # load sc s.xsf
Done!
* X450G2-48p-G4.17 #

Ali_Askari
New Contributor II
Thank you so much. That's exactly what I needed.

StephenW
Extreme Employee
easy python script. Just save it as a .py file and run it like you would a .xsf.

exsh.clicmd('show vlan', True)
exsh.clicmd('show port conf no', True)
exsh.clicmd('show vlan "Default"', True)
print ("Done!")
GTM-P2G8KFN