LISTFILESCMD='ls *.jpg' FQUANTITY=3000 FOLDERLIST=`seq -w 1 10` for FOLDER in $FOLDERLIST; do mkdir $FOLDER; mv `$LISTFILESCMD | head -n $FQUANTITY` $FOLDER; done
LISTFILESCMD='ls *.jpg' FQUANTITY=3000 FOLDERLIST=`seq -w 1 10` for FOLDER in $FOLDERLIST; do mkdir $FOLDER; mv `$LISTFILESCMD | head -n $FQUANTITY` $FOLDER; done