請幫助我。我無法實現IF內WHILE:無法實現如果在迴路內
while IFS=';' read one two three;
do
if (($three >= 1)) #this is a line that i can't understand
then X=$(for i in $two
do BIN=$(echo "obase=10; ibase=16; $i" | bc)
echo $BIN
done)
fi
done < /testcsv.csv
和輸出是:
./test.sh: line 34: ((: <= 1 : syntax error: operand expected (error token is "<= 1 ")
而你寫的究竟是哪一部分是李ne 34? – 2014-11-08 22:18:34
你確定你提供了足夠的信息來閱讀嗎?當出現提示時,應該輸入用分號分隔的三個詞,最後一個詞應該是一個數字(很可能這就是你錯過了獲得錯誤的地方),第二個詞應該是由空格分隔的十六進制數字列表。但說實話,這是一段可怕的代碼,它受代碼注入的影響。不要使用它。 – 2014-11-08 22:23:23