grep 'hello' file.txt,在 file.txt 中查找包含 hello 的行。grep -r 'world' dir/,递归查找 dir/ 目录及其子目录下包含 world 的行。grep -n 'error' file.txt,在 file.txt 中查找包含 error 的行,并显示行号。grep -i 'apple' file.txt,在 file.txt 中查找包含 apple 的行,忽略大小写。grep -E '[0-9]{3}' file.txt,在 file.txt 中查找包含三个连续数字的行。