Is it possible to mimic process substitution on msys /mingw (with bash 3.x)

╄→尐↘猪︶ㄣ 提交于 2019-12-06 10:37:43

I mananed to do process substitution in bash 3.x. The syntax is correct. It is supported by bash shell. So I would suggest to check what shell your are running and execute somiting like:

/bin/bash diff <(echo "a") <(echo "b")

Process substitution is not a POSIX compliant feature. To enable try to run:

set +o posix

See also this for more info.

The other way is to use named pipes. I tested on GNU bash version 4.1.2(1):

diff - p <<< "test" & echo "test2" > p

See Working with Named Pipes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!