Skip to main content
deleted 12 characters in body
Source Link
Jodka Lemon
  • 3.2k
  • 18
  • 44

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 

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 

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*" 
Source Link
Jodka Lemon
  • 3.2k
  • 18
  • 44

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