2.2 grep: 在文件内进 行搜索 • 使用 egrep 命令在文件中查找所有包含字符串 (b) 的行 : – #egrep "\([b]\)" guide.txt • (see section 1 for a list of compatible boards ), or (b) there is an • connect to the network , or (b) you have a " dynamic " IP address, – # grep "\([b]\)" guide.txt • This is version 2.2.2 of the book , " Linux Installation and Getting to PostScript printers . • This document was generated by a set of This is not the " o fficial " version of the book ! Please see – #grep "(b)" guide.txt
Acegene IT Co. Ltd. 18
2.2 grep: 在文件内进 行搜索 • 每个 grep 命令程序都能够接受几乎相同的 命令行参数。其中常用的一个是 -n ,即显 示行号参数。 – #egrep -n "friend" guide.txt 1242 : large extent by the window manager . This friendly program is 1942 : copy Linux from a friend who may already have the software , or 5161 : ( Unfortunately , the system was being unfriendly .)