怎么在Linux用egrep查找文档中所有以a开头t结尾的单词?

2025-03-24 05:31:08
推荐回答(2个)
回答1:

#以下五行为 testfile 中包含Linux字符的行 testfile:hello Linux! testfile:Linux is a free Unix-type operating system. testfile:This is a Linux testfile! testfile:Linux testfile:Linux #以下两行为testfile1中含Linux字符的行 testfile1:helLinux! testfile1:This a Linux testfile! #以下两行为 testfile_2 中包含Linux字符的行 testfile_2:Linux is a free unix-type opterating system testfile_2:Linux test

回答2:

gep -o 'a\S*t'