Skip to content

Instantly share code, notes, and snippets.

@guanix
Created March 17, 2011 18:33
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 guanix/874864 to your computer and use it in GitHub Desktop.
Save guanix/874864 to your computer and use it in GitHub Desktop.
#!/bin/sh
prev=0
limit=100
for this in `cat $1`; do
if [ $prev -eq 0 ]; then
prev=$this
continue
fi
diff=$(($this - $prev))
if [ $diff -gt $limit ]; then
echo $prev $this
fi
prev=$this
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment