Skip to content

Instantly share code, notes, and snippets.

@alankis
Created April 9, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alankis/59dff944c9ac045dee555a9f25804414 to your computer and use it in GitHub Desktop.
Save alankis/59dff944c9ac045dee555a9f25804414 to your computer and use it in GitHub Desktop.
#!/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