]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - bin/mv-p
zsh/rc: Add pdf command.
[config/dotfiles.git] / bin / mv-p
1 #!/bin/sh
2
3 # Wrapper command for `mv` which creates the target directory before moving
4 # the file there.
5
6
7 # Get last argument.
8 for last; do :; done
9
10 mkdir -p "`dirname "$last"`" \
11     && mv "$@"