Arithmetic in sh

never remember this

LIMIT=15
a=1
cd $SRC
for filename in *
do
  if  (( a <= LIMIT ))
  then
   mv "$filename" "$TARG"
  ((a += 1))
  fi
done

Leave a Reply