比较目录时出现语法错误

时间:2017-12-17 23:00:49

标签: bash

运行以下命令时出现以下错误: bash -  意外令牌spl1 = UnivariateSpline(x[:10] + x[11:], y[:10] + y[11:], s=0) 附近的语法错误

(

A=/dev1/annemarie/
B=/home/annemarie/
diff -u <(find "$B" |sed "s:$B::") <(find "$A" | sed "s:$A::") | sed "/^+\//!d; s::$A/:"

diff -u <(find " B=/home/annemarie/" |sed "s: B=/home/annemarie/::") <(find "/dev1/annemarie/" | sed "s:/dev1/annemarie/::") | sed "/^+\//!d; s::/dev1/annemarie//:"

问题出在哪里?

1 个答案:

答案 0 :(得分:2)

包含进程替换的脚本必须通过bash运行,而不是sh。确保shebang引用/bin/bash和/或在命令行上将脚本传递给bash