Return to Snippet

Revision: 10638
at January 7, 2009 10:52 by aresnick


Initial Code
mvp() {
    oldFilePath=$1
    newFilePath=$2'

    if [ ! -f $newFilePath ]; then
	mkdir -p ${newFilePath%/*}
	mv $oldFilePath $newFilePath
    fi
}

Initial URL

                                

Initial Description

                                

Initial Title
mv a file to a nonexistent location, creating the directory structure needed

Initial Tags
Bash

Initial Language
Bash