当前位置:网站首页>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中的字段值为*时,表示模糊匹配而不是字符串。
边栏推荐
- Kotlin combines flatmap for filtering and zip merge operators
- Record a stroke skin bone error of the skirt
- [quick start of Digital IC Verification] 10. Verilog RTL design must know FIFO
- Complete linear regression manually based on pytoch framework
- buureservewp(2)
- 使用 Nocalhost 开发 Rainbond 上的微服务应用
- BiSeNet的特点
- Four items that should be included in the management system of integral mall
- CCTV is so warm-hearted that it teaches you to write HR's favorite resume hand in hand
- Blob 对象介绍
猜你喜欢
随机推荐
CCTV is so warm-hearted that it teaches you to write HR's favorite resume hand in hand
Blob 對象介紹
【雅思口语】安娜口语学习记录 Part2
机器人教育在动手实践中的真理
力扣(LeetCode)187. 重复的DNA序列(2022.07.06)
【雅思口语】安娜口语学习记录 Part3
It's too true. There's a reason why I haven't been rich
雅思考试自己的复习进度以及方法使用【日更版】
Detailed explanation of apply, also, let, run functions and principle analysis of internal source code in kotlin
利用 Helm 在各类 Kubernetes 中安装 Rainbond
Make LIVELINK's initial pose consistent with that of the mobile capture actor
Interactive book delivery - signed version of Oracle DBA work notes
船载雷达天线滑环的使用
海信电视开启开发者模式
Myabtis_ Plus
LeetCode简单题之找到一个数字的 K 美丽值
解析创新教育体系中的创客教育
Blob object introduction
UnityHub破解&Unity破解
Rainbond结合NeuVector实践容器安全管理








