[[NQS>http://gnqs.sourceforge.net/docs/papers/mnqs_papers/original_cosmic_nqs_paper.htm]]で何番から何番までのjobを削除するというスクリプトを書くときに、job番号が7桁とかあるんだけど、それをそのままforに入れたら動いてくれなかった。以下のように差をとって回避した。 #highlight(linenumber,bash){{#!/bin/bash declare -i start declare -i stop echo "From ? (Enter the Integer)" read start echo "To ? (Enter the Integer)" read stop declare -i n n=$stop-$start declare -i i declare -i j for i in $(seq 0 $n) do j=$start+$i qdel -k $j done}} forが以下の様な感じで、start,stopが大きいと動かない。 #highlight(linenumber,bash){for i in $(seq $start $stop) do qdel -k $i done} *参考リンク -[[ALL about Linux: bash で扱える整数の上限>http://luna2-linux.blogspot.jp/2010/07/bash.html]]