read a b seq $(((a+2)/3*3)) 3 $b > f1 seq $a $b | grep 3 > f2 cat f1 f2 | sort -nu