有时,由于子 shell 进程,shell 命令的行为会出乎意料。
我最近遇到的一个例子是这个命令在子 shell 中不起作用 because xargs runs the cd
-command:
ls | sort | tail -1 | xargs cd
另一个是 Makefile 中的 cd
doesn't work。
有没有办法可视化哪些外壳/子外壳/进程在(链式)命令中做什么?我想对他们有更好的感觉。
有时,由于子 shell 进程,shell 命令的行为会出乎意料。
我最近遇到的一个例子是这个命令在子 shell 中不起作用 because xargs runs the cd
-command:
ls | sort | tail -1 | xargs cd
另一个是 Makefile 中的 cd
doesn't work。
有没有办法可视化哪些外壳/子外壳/进程在(链式)命令中做什么?我想对他们有更好的感觉。