V2EX  ›  英汉词典
Enqueued related words: Awk, Egrep, Fgrep, Ripgrep, Sed

Grep

释义 Definition

grep:一个用于在文本中按模式(通常是正则表达式)搜索并输出匹配行的命令行工具;也可作动词,表示“用 grep 搜索”。(在类 Unix 系统中极常见)

发音 Pronunciation

/ɡrɛp/

例句 Examples

I used grep to find the error message in the log.
我用 grep 在日志里找到了那条错误信息。

To diagnose the issue, she recursively grepped the project directory for the missing function name and compared the results across branches.
为诊断问题,她用 grep 递归搜索整个项目目录里缺失的函数名,并对比了不同分支的结果。

词源 Etymology

grep 源自早期文本编辑器 ed 中的命令 g/re/p,意思是 “global / regular expression / print”(全局地按正则表达式查找并打印匹配内容)。后来这个操作被独立实现为工具并广泛流行,于是 “grep” 成了命令名,也逐渐被当作动词使用(如 to grep for…)。

相关词 Related Words

文学作品用例 Literary Works

较少直接出现在传统文学作品中(属于计算机命令行术语),但常见于技术写作与黑客文化相关作品,例如:

  • The UNIX Programming Environment(Kernighan & Pike)
  • UNIX Power Tools(O’Reilly 系列)
  • The Linux Command Line(William Shotts)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   864 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 18:03 · PVG 02:03 · LAX 10:03 · JFK 13:03
♥ Do have faith in what you're doing.