该语法
<(...)仅受BASH支持。
对于任何POSIX Shell,请使用以下方法:
sh -c 'tail -n 1000 -F catalina.out | if grep -qP --line-buffered ".+" ; then ...'
即
if使用管道将stdin重定向移到的前面。该
if会传递给标准输入
grep。
if tail ...| grep不会起作用,因为
if将无法看到它的
then/
fi因为管道分离过程。

该语法
<(...)仅受BASH支持。
对于任何POSIX Shell,请使用以下方法:
sh -c 'tail -n 1000 -F catalina.out | if grep -qP --line-buffered ".+" ; then ...'
即
if使用管道将stdin重定向移到的前面。该
if会传递给标准输入
grep。
if tail ...| grep不会起作用,因为
if将无法看到它的
then/
fi因为管道分离过程。