Last active
September 5, 2018 17:55
-
-
Save justin-endler/93a68ab9e472d4e6a015ab71d86d0a30 to your computer and use it in GitHub Desktop.
mv to destination, same name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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