小编hik*_*koo的帖子

如何在 Ubuntu 终端中使用 grep 从 txt 文件中获取特定单词

我有一个txt文件。在那个文件中,我想过滤一个特定的词。

例子:

$PILOT_FIRSTNAME $PILOT_LASTNAME. This is the final confirmation for this flight.
Run Code Online (Sandbox Code Playgroud)

我想要这样的输出:

PILOT_FIRSTNAME

PILOT_LASTNAME
Run Code Online (Sandbox Code Playgroud)

带 的所有单词是什么$,那个单词只取?

command-line text-processing

4
推荐指数
2
解决办法
674
查看次数

标签 统计

command-line ×1

text-processing ×1