This works for me (but on CentOS 7.1). Did I miss something?
read -p "Send files from date (MM-DD-YYYY) : " fromdate if [[ -z ${fromdate// } ]] then echo "Empty input" fromdate=$(date +%m-%d-%Y) fi echo "Input: $fromdate" find /path/to/directory -maxdepth 1 -name "*$fromdate*" echo