Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- curdate=$(date +%F)
- startdate=$(date +%Y-%m-10)
- lastmnth=$(date --date="3 month ago" +%Y-%m)
- if [ "$curdate" > "$startdate" ];
- then
- /usr/bin/find /data/backups/mysql/weekly/* -name '*$lastmnth*'
- else
- echo "nope"
- fi
Add Comment
Please, Sign In to add comment