I have a directory with a large number of files, and I need to separate them by owner. My instinct was to pipe ls output to mv, but I've seen that that is not recommended due to the possibility that filenames could contain special characters. In any case, the closest I can think of is:
ls -l | grep OWNER | find regex_for_filename | mv ../
but this does not work.
Note - I do have a reliable regex for files within the directory, but the ownership is scattered.