Skip to content

Instantly share code, notes, and snippets.

@theeye-io
Last active July 25, 2017 02:11
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 theeye-io/3a2faec1fb329436fc703e28f07e15ae to your computer and use it in GitHub Desktop.
Save theeye-io/3a2faec1fb329436fc703e28f07e15ae to your computer and use it in GitHub Desktop.
For a $1 Path It verifies if $2 log sync is below 99%
#!/bin/bash
cd $1
lastPercentageInteger=$(tail $2|grep Percentage|cut -d':' -f6|tail -n1|cut -d'.' -f1|tr -d ' ')
if [ $lastPercentageInteger -lt 99 ];then
echo "Percentage is $lastPercentageInteger which is lower than 99";
echo failure
else
echo normal
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment