event manager applet SHOW_INT_LINK
event cli pattern "(sh|sho|show)\s+(int|inte|inter|interf|interfa|interfac|interface)\s+(link)" enter
action 001.1 cli command "enable"
action 001.2 puts "\n\nShow Interface Link (List shows ONLY notconnect ports)\n------------------------------------------------------"
action 001.3 cli command "show int status | i notconnect"
action 002.1 foreach _line "$_cli_result" "\n"
action 002.2 regexp "^([A-Z][a-z][0-9][^[:space:]]+)" "$_line" match _intf
action 002.3 if $_regexp_result eq "1"
action 003.1 cli command "show interface $_intf"
action 004.1 foreach _iline "$_cli_result" "\n"
action 004.2 regexp "^(.*Last input.*)\r$" "$_iline" match _lastup
action 004.3 if $_regexp_result eq "1"
action 004.4 puts "$_intf -$_lastup"
action 004.5 end
action 099.1 end
action 099.2 end
action 099.3 end
-----------------------------------------------------------------------------------------------------------------
Above script is working well and listing the ports which are 'not connect' and Last Input never. However how it get it disabled via a script by adding CLI commands in the applet.
Can anyone suggest please how to get the ports disabled ?
Regards
Sanjay