# changed : to _ and removed the -xv
# also a few minor changes
#!/bin/bash
#
today=$(/bin/date +"%Y_%h_%d_%H_%M_%S")
read -p "Please input the name of the directory you want back up : " directoryName
echo "You entered $directoryName"
if [ "$(find -type d -name "$directoryName" | wc -l)" -gt "1" ];then
find -type d -name "$directoryName"
read -p "more then one directories . enter the one you want to backup : " backupfile
tar cfz $backupfile.$today.tar.gz $backupfile
else
backupfile=$(find -type d -name "$directoryName")
tar cfz $backupfile.$today.tar.gz $backupfile
fi
mv $backupfile.$today.tar.gz $HOME/backups