2010年4月22日木曜日

bash - while

bashスクリプトで終了時にechoで判定用の文字をだし

while [ $(bash ./スクリプト) = "判定" ];do (command);done

スクリプトが綺麗に終わるまで終わらせない。


--xxx.sh--
if [ まだ終わらせない ];then
echo "1";exit 0
else
echo "0";exit0
fi
-----------------
while [ $(bash ./xxx.sh) = "1" ];do (command);done

0 件のコメント: