How could I move files to subdirectories based on the common part of their names?For example, with files named as comment_LastName.pdf and comment_LastName.md and sub-directories named as FirstName_LastName/ where all FirstName and LastName vary, how do I move files comment_X.pdf to subdirectory Mister_X/ ? (but for all files / directories at once)Here's an unsuccessful attempt with zmv but I can't figure out the proper command...zmv -n 'comment_(*).(pdf|md)' '*_$1/$f'
move files based on pattern with zsh/zmv
zsh;rename