I've got 291 numbered files (starting at 001 - title and ending at 291 - title) that need moved into separate directories. (001 to 021 to folder 1, 022 to 053 to folder 2, they aren't necessarily the same number of files each time).
I figured I could do it in a yucky way like this: ls | head -n 21 | sed -r 's|(.*)|mv \1 /path/to/folder1|' | sh
I'm almost positive there's a better way, so what would it be?
EDIT: So that would've worked fine, but I remembered...
I'm not stuck using a terminal, so I used a file manager to click and drag. Question still stands though.
ls -l | grep ^- | wc -l
to get the numbers of lines.