Skip to content

Instantly share code, notes, and snippets.

@mylamour
Created January 2, 2017 13:08
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 mylamour/8a094df9523f484ca85b53a181621b93 to your computer and use it in GitHub Desktop.
Save mylamour/8a094df9523f484ca85b53a181621b93 to your computer and use it in GitHub Desktop.
use crontab to define a event and exec every second , it's simply like a log count
##!/bin/bash
step=1
for (( i = 0; i < 60; i=(i+step) )); do
# ls ~/tmp/javfor.me/ | wc -l
# ls ~/tmp/javfor.me/ | grep -E "html\."
ls -R ~/jav/ | wc -l
sleep $step
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment