我经常在网上看到用不同符号连接各种命令的教程。例如:
command1 | command2
command1 & command2
command1 || command2
command1 && command2
Run Code Online (Sandbox Code Playgroud)
其他人似乎将命令连接到文件:
command1 > file1
command1 >> file1
Run Code Online (Sandbox Code Playgroud)
这些是什么?他们叫什么?他们在做什么?还有更多吗?
我正在尝试运行strace
trough ccze
,但管道没有按预期工作。
我正在运行以测试的命令行是sudo strace -p $(pgrep apache2) | grep open
,所有行都是输出,忽略 grep。
有什么特别之处strace
会导致这种行为吗?