当前位置:网站首页>Splunk子查询模糊匹配csv中字段值为*
Splunk子查询模糊匹配csv中字段值为*
2022-07-07 05:19:00 【QYHuiiQ】
之前我们的案例中常用的是直接在spl中用*来模糊匹配,但是如果在一个csv中定义某个字段的值为*,然后在spl里对该csv进行查询时,这个*值是否还表示模糊匹配?针对这个疑问,做了如下测试:
- 创建csv测试数据
| makeresults
| eval student_name="T*",hometown="Zhejiang"
| fields - _time
| outputlookup student.csv
#这里我想表示的是名字以T开头的,所有学生的hometown都是Zhejiang查看csv:

- 使用spl将原数据与csv合并查询
| makeresults
| eval student_name="Tina",age="17",hometown="Zhejiang"
| search
[| inputlookup student.csv
| fields student_name hometown]
| table student_name age hometown这条数据中的学生名字是以开头的,如果csv中的T*可以表示模糊匹配的话,那么我们的执行结果应该是可以查询出来这条数据,如果csv中的T*表示字符串"T*",那么就查不出来结果。
执行结果:
Case1:

Case2:

说明csv中的T*表示模糊匹配。
Case3:

Case4:

通过上面的测试可以得出,csv中的字段值为*时,表示模糊匹配而不是字符串。
边栏推荐
- buureservewp(2)
- 电池、电机技术受到很大关注,反而电控技术却很少被提及?
- LeetCode简单题之找到一个数字的 K 美丽值
- OpenJudge NOI 2.1 1752:鸡兔同笼
- 王爽 《汇编语言》之寄存器
- 云原生存储解决方案Rook-Ceph与Rainbond结合的实践
- Find the mode in the binary search tree (use medium order traversal as an ordered array)
- Summary of redis functions
- It took "7" years to build the robot framework into a micro service
- 让Livelink初始Pose与动捕演员一致
猜你喜欢
随机推荐
The use of generics and vararg variable parameters in kotlin
[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning
柯基数据通过Rainbond完成云原生改造,实现离线持续交付客户
Vulnerability recurrence fastjson deserialization
LeetCode简单题之字符串中最大的 3 位相同数字
Unityhub cracking & unity cracking
eBPF Cilium实战(1) - 基于团队的网络隔离
Zsh shell adds automatic completion and syntax highlighting
Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
Zcmu--1492: problem d (C language)
机器人教育在动手实践中的真理
Linux Installation MySQL 8.0 configuration
复杂网络建模(一)
探索STEAM艺术设计中的创造力
青龙面板--整理能用脚本
发挥创客教育空间的广泛实用性
漏洞复现-Fastjson 反序列化
Openjudge noi 2.1 1752: chicken and rabbit in the same cage
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
Notes on PHP penetration test topics









