Skip to content

Instantly share code, notes, and snippets.

@justin-endler justin-endler/mvd.sh
Last active Sep 5, 2018

Embed
What would you like to do?
mv to destination, same name
#!/bin/bash
# get source and destination parent
if [[ -z $1 ]]; then
echo "source and destionation parent arguments required"
exit 1
fi
SOURCE=$1
DESTINATION_PARENT=~/Documents/bb-bk-00
# derive DESTINATION
DESTINATION="$DESTINATION_PARENT/$SOURCE"
echo $DESTINATION;
# move file
mv $SOURCE $DESTINATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.