It sounds like the answer is no :). I don't really want to create an alias or func just to do this, often because it's one-off and I'm already in the middle of typing the mv
command, but I found something that works well for that:
mv *.sh shell_files/also_with_subdir/ || mkdir -p $_
If mv
fails (dir does not exist), it will make the directory (which is the last argument to the previous command, so $_
has it). So just run this command, then up to re-run it, and this time mv
should succeed.