我只想从文本文件中提取匹配REGEX - CVE-[0-9]{4}-[0-9]{4,19}的CVE数字。由于数据集的合并,CVE在每一行中的表示方式是不同的。
cat text.txt
Security updates available for Adobe Flash Player (CVE-2014-8439)
CVE-2016-4449: SUSE Linux Security Advisory
Security vulnerabilities fixed in Firefox 66:CVE-2019-9799我可以使用egrep 'CVE-[0-9]{4}-[0-9]{4,19}' test.txt匹配这些行
如何仅提取CVE编号以使用grep或AWK获取列表?
CVE-2014-8439
CVE-2016-4449
CVE-2019-9799https://stackoverflow.com/questions/74048261
复制相似问题