accesslist-duplicates: Read index from terminal inkey

This commit is contained in:
Christian Hesse 2019-03-16 23:36:38 +01:00
parent 39d1027d69
commit 213d326ad4
3 changed files with 9 additions and 9 deletions

View file

@ -21,9 +21,9 @@
/ caps-man access-list print where mac-address=$Mac; / caps-man access-list print where mac-address=$Mac;
:set Shown ($Shown, $Mac); :set Shown ($Shown, $Mac);
:put "\nEnter to skip, numeric id to remove!"; :put "\nNumeric id to remove, any key to skip!";
:local Remove [ :return ]; :local Remove ([ :terminal inkey ] - 48);
:if ($Remove != "") do={ :if ($Remove >= 0 && $Remove <= 9) do={
:put ("Removing numeric id " . $Remove . "...\n"); :put ("Removing numeric id " . $Remove . "...\n");
/ caps-man access-list remove $Remove; / caps-man access-list remove $Remove;
} }

View file

@ -21,9 +21,9 @@
/ interface wireless access-list print where mac-address=$Mac; / interface wireless access-list print where mac-address=$Mac;
:set Shown ($Shown, $Mac); :set Shown ($Shown, $Mac);
:put "\nEnter to skip, numeric id to remove!"; :put "\nNumeric id to remove, any key to skip!";
:local Remove [ :return ]; :local Remove ([ :terminal inkey ] - 48);
:if ($Remove != "") do={ :if ($Remove >= 0 && $Remove <= 9) do={
:put ("Removing numeric id " . $Remove . "...\n"); :put ("Removing numeric id " . $Remove . "...\n");
/ interface wireless access-list remove $Remove; / interface wireless access-list remove $Remove;
} }

View file

@ -22,9 +22,9 @@
/ %PATH% access-list print where mac-address=$Mac; / %PATH% access-list print where mac-address=$Mac;
:set Shown ($Shown, $Mac); :set Shown ($Shown, $Mac);
:put "\nEnter to skip, numeric id to remove!"; :put "\nNumeric id to remove, any key to skip!";
:local Remove [ :return ]; :local Remove ([ :terminal inkey ] - 48);
:if ($Remove != "") do={ :if ($Remove >= 0 && $Remove <= 9) do={
:put ("Removing numeric id " . $Remove . "...\n"); :put ("Removing numeric id " . $Remove . "...\n");
/ %PATH% access-list remove $Remove; / %PATH% access-list remove $Remove;
} }