]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - bin/mv-p
62b1b364179c94c77135172dd1b852b4e3ee0d34
[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 "$@"