项目

一般

简介

行为

checkIpList
检测人物登录ip是否匹配指定文件的某行

标签:命令定义|checkIpList

格式
命令名 参数1
checkIpList 文件路径
说明
  • 参数1: 检测文件路径
    路径需要基于..\Mir200\Envir
    举例
    设定检测路径为
    \testlist.txt
    完整检测路径
    ..\Mir200\Envir\testlist.txt


特戒引擎脚本示例:

[@main]
#act
mov s$file \数据文件\测试非预制数据文件.txt
#say
<添加ip到指定文件/@添加>\ \
<清理ip列表文件/@清理>\ \
<检测ip是否在文件中/@检测ip>\ \
<检测文件存在/@存在>\ \
 
[@添加]
#if
#act
addIpList <$str(s$file)>
readTxt <$str(s$file)> s0
;print命令在控制台输出文件内容
print 文件内容-> s0
 
[@清理]
#if
#act
delIPList <$str(s$file)>
readTxt <$str(s$file)> s0
print 文件内容-> s0
 
[@检测ip]
#if
checkIpList <$str(s$file)>
#act
print ip存在于文件中
#elseAct
print ip不存在于文件中
 
#if
#act
readTxt <$str(s$file)> s0
print 文件内容-> s0
 
[@存在]
#if
fileExist <$str(s$file)>
#act
print 文件存在
readTxt <$str(s$file)> s0
print 文件内容-> s0
#elseAct
print 文件不存在

yangdefeng 更新于 超过 2 年 之前 · 3 修订