Linux 命令行:Sort、Grep、Less 命令

Har*_*uch 4 linux command-line

我该怎么做:

使用sort,grepless命令(通过管道连接),/etc/passwd按字母顺序对文件进行排序,并仅显示以单词“false”结尾的行。

Joh*_*n T 6

grep false$ /etc/passwd | sort | less
Run Code Online (Sandbox Code Playgroud)

  • 为了获得更好的性能,您应该先执行 grep,然后进行排序。 (8认同)