项目

一般

简介

CheckIpList » 历史记录 » 版本 3

yangdefeng, 2022-06-22 11:22

1 3 yangdefeng
h4. _*%{color:green}checkIpList%*_
2 2 machenhe
检测人物登录ip是否匹配指定文件的某行
3 1 machenhe
4
5
标签:命令定义|checkIpList
6
7
*格式*
8
|命令名		|参数1		|
9
|checkIpList	|文件路径	|
10
11
*说明*
12
* 参数1: 检测文件路径
13 3 yangdefeng
路径需要基于..\Mir200\Envir
14 1 machenhe
%{color:lightGrey}举例
15
设定检测路径为
16 3 yangdefeng
\testlist.txt
17 1 machenhe
完整检测路径
18 3 yangdefeng
..\Mir200\Envir\testlist.txt%
19 1 machenhe
20
-
21
-
22
23 3 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
24 1 machenhe
25
bq. [<notextile>@</notextile>main]
26
#act
27 3 yangdefeng
[[mov]] s$file \数据文件\测试非预制数据文件.txt
28 1 machenhe
#say
29 3 yangdefeng
<添加ip到指定文件/<notextile>@</notextile>添加>\ \
30
<清理ip列表文件/<notextile>@</notextile>清理>\ \
31
<检测ip是否在文件中/<notextile>@</notextile>检测ip>\ \
32
<检测文件存在/<notextile>@</notextile>存在>\ \
33 1 machenhe
&nbsp;
34
[<notextile>@</notextile>添加]
35
#if
36
#act
37
[[addIpList]] <$str(s$file)>
38
[[readTxt]] <$str(s$file)> s0
39
%{color:lightGrey};print命令在控制台输出文件内容%
40
print 文件内容-> s0
41
&nbsp;
42
[<notextile>@</notextile>清理]
43
#if
44
#act
45
delIPList <$str(s$file)>
46
readTxt <$str(s$file)> s0
47
print 文件内容-> s0
48
&nbsp;
49
[<notextile>@</notextile>检测ip]
50
#if
51
*%{color:green}checkIpList%* <$str(s$file)>
52
#act
53
print ip存在于文件中
54
#elseAct
55
print ip不存在于文件中
56
&nbsp;
57
#if
58
#act
59
readTxt <$str(s$file)> s0
60
print 文件内容-> s0
61
&nbsp;
62
[<notextile>@</notextile>存在]
63
#if
64
[[fileExist]] <$str(s$file)>
65
#act
66
print 文件存在
67
readTxt <$str(s$file)> s0
68
print 文件内容-> s0
69
#elseAct
70
print 文件不存在