Guest User

Untitled

a guest
Sep 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/bash
  2. curdate=$(date +%F)
  3. startdate=$(date +%Y-%m-10)
  4. lastmnth=$(date --date="3 month ago" +%Y-%m)
  5. if [ "$curdate" > "$startdate" ];
  6.         then
  7.                 /usr/bin/find /data/backups/mysql/weekly/* -name '*$lastmnth*'
  8.         else
  9.                 echo "nope"
  10. fi
Add Comment
Please, Sign In to add comment