1

There is date in my file, like 30-apr-2015. How can I compare this with the current date and get notified if they are equal?

1
  • 3
    Have you made an effort to write the script? If you have, please paste the portion of your code and the issue you are facing and we can help you.
    – rahul
    Apr 8, 2015 at 11:43

1 Answer 1

1

This code does the comparison and informs you by printing a message on the console where you typed the command:

[[ $(date +%Y%m%d -d $(< file)) == $(date +%Y%m%d) ]] && echo "wake up"

You may want to replace the echo by any other command that notifies you, e.g., use the command mail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .