找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 11899|回复: 3

[脚本] 判断数量的脚本

[复制链接]
发表于 2018-8-15 12:00:51 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 e_zhangiso 于 2018-8-15 12:04 编辑

{
:local tepx "0"
:local tepz "0"
:set tepx [:len [/interface pppoe-client find running=yes name !=("uni-1" & "uni-2")]]
:set tepz [:len [/ip fir nat find action="src-nat" disabled=no chain=srcnat comment !=("uni-1" & "uni-2")]]
以上脚本要如何写才是正确的,请大神指教




QQ图片20180815115429.png
QQ图片20180815115547.png
routeros
发表于 2018-8-15 16:36:00 | 显示全部楼层
:local tepx 0
:local tepz 0
:set tepx [:len [/interface pppoe-c find (name~"uni")=no]]
:set tepz [:len [/ip fir nat find (comment~"uni")=no]]
routeros
回复

使用道具 举报

发表于 2018-8-15 17:47:13 | 显示全部楼层
你的这个搞反了你直接查找 tel 1-2的就可以了
routeros
回复

使用道具 举报

 楼主| 发表于 2018-8-15 18:59:45 | 显示全部楼层
cspm333 发表于 2018-8-15 16:36
:local tepx 0
:local tepz 0
:set tepx [:len [/interface pppoe-c find (name~"uni")=no]]

多谢指教,经测试可以使用
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-4-19 11:45 , Processed in 0.050699 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表