awk中的if ,else

local pct="$(awk -v one="$1" -v two="$2" 'BEGIN{ if (two > 0) { printf "%d", one/two*100; } else {p
rint 0} }')";

posted on 2014-09-09 16:52  zitong  阅读(2644)  评论(0编辑  收藏  举报