Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有件事一直困扰着我:
watch cat file
工作正常,每 2 秒在文件中报告一次输出。
watch cat file | grep "text"
确实有效,但只有一行很奇怪。
监视耦合命令的正确语法是什么?
监视后在命令周围使用引号:
watch 'cat file | grep "text"'