Skip to content

Instantly share code, notes, and snippets.

@whizzalan
Created October 22, 2018 09:21
Show Gist options
  • Save whizzalan/80c5cdd30db0695f4a67c53ee849ecbe to your computer and use it in GitHub Desktop.
Save whizzalan/80c5cdd30db0695f4a67c53ee849ecbe to your computer and use it in GitHub Desktop.
Watch File Example
watch_file=`stat -c %Y owen_watch_file.sh`;
now_=`date +%s`;
if [ $[ $now_-$watch_file ] -gt 1 ];then
echo 'Owen Good Job!';
else
echo 'This file Not be changed!';
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment