This question already has an answer here:
I want to place a list of files into individual directories I create from each filename. So given the files in the root directory:
Movie1.avi movie2.m4v movie3.mp4
I want to mkdir
then move each file into the corresponding directory.
Any simple way to to generate the directories and then move the files.
mkdir << find /Video/Movies/ -maxdepth 1 -type f | sort mv << find /Video/Movies/ -maxdepth 1 -type f | sort