#!/bin/sh # Wrapper command for `mv` which creates the target directory before moving # the file there. # Get last argument. for last; do :; done mkdir -p "`dirname "$last"`" \ && mv "$@"