其實調試可以
#!/bin/bash -x
運行一下看看,錯誤一目了然吧。
建議使用unix經典的dc計算器:
“...
MARK=$(grep "$ID" "$COURSE" |tail -1 | cut -f2 -d' ')
SUM=$(echo $SUM $MARK 2k+p|dc)
另外試試看awk, perl都是很方便的
其實調試可以
#!/bin/bash -x
運行一下看看,錯誤一目了然吧。
建議使用unix經典的dc計算器:
“...
MARK=$(grep "$ID" "$COURSE" |tail -1 | cut -f2 -d' ')
SUM=$(echo $SUM $MARK 2k+p|dc)
另外試試看awk, perl都是很方便的
WENXUECITY.COM does not represent or guarantee the truthfulness, accuracy, or reliability of any of communications posted by other users.
Copyright ©1998-2024 wenxuecity.com All rights reserved. Privacy Statement & Terms of Use & User Privacy Protection Policy