Created
April 9, 2017 18:49
-
-
Save alankis/59dff944c9ac045dee555a9f25804414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
path_to_folder=$1 | |
[[ -z `find "$path_to_folder" -mmin -1` ]] | |
if [ $? -eq 0 ] | |
then | |
echo -e "nothing has changed" | |
else | |
mail -s "Files in $path_to_folder has been changed" alan.kish38@gmail.com <<< "Files in $path_to_folder has been changed." | |
#echo -e "files has been changed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment