shell脚本没有运行但只是退出

时间:2014-04-04 09:46:35

标签: shell

我正在尝试运行以下shell脚本,但它退出时没有闪烁任何错误(我忽略程序错误但不是shell错误)。

#!/bin/bash
export TIMEFORMAT="%E"
rm -f mix_histogram
x=1
d=0
while read y
do
d=$(( $(( $d + 1 )) % 2 ))
(time echo '\n' | /home/pallavi/cudaSamples/3_Imaging/histogram 0 >/dev/null 2>/dev  /null) > /dev/null 2>> mix_histogram &
t1=$(echo "l(32768)" | bc -l)
t2=$(echo "l(($y))" | bc -l)
t=$(echo "( $t1 - $t2 )" | bc -l)
t=$(echo "( 25 * $t )" | bc -l)
t=$(echo "($t)" | bc)
if [ $(echo "200 < $t"|bc) -eq 1 ]
then
   t=200
fi
sleep $t
done < stream1_50
wait

任何人都可以告诉我它为什么不执行?

1 个答案:

答案 0 :(得分:0)

你怎么知道它没有执行?

在这种情况下,以下内容非常有用:以这种方式运行脚本

bash -x path/to/your/script 

这将显示标准错误的执行跟踪。

相关问题