#!/bin/bash RESULTS=$(find . -name '*.py' -exec grep -H fake_it[\ ]*=[\ ]*True {} +) LEN=`expr length "$RESULTS"` echo $RESULTS # echo $LEN if [[ $LEN -gt 0 ]]; then echo echo "======================================================" echo "ERROR: Never commit code with fake seeds or passwords!" echo "======================================================" exit 1 else exit 0 fi