July 2018
Intermediate to advanced
354 pages
10h 57m
English
There are a few things to remember. The script has to be in your path so that Git can use the script. Besides this, only imagination sets the boundaries:
#!/bin/bash
NUMBEROFCOMMITS=$(git log --all --oneline | wc -l)while :WHICHCOMMIT=$(( ( RANDOM % $NUMBEROFCOMMITS ) + 1 ))COMMITSUBJECT=$(git log --oneline --all -${WHICHCOMMIT} | tail -n1)COMMITSUBJECT_=$(echo "$COMMITSUBJECT" | cut -b1-60)do if [ $RANDOM -lt 14000 ]; then echo "${COMMITSUBJECT_} PASSED" elif [ $RANDOM -gt 15000 ]; then echo "${COMMITSUBJECT_} FAILED" fi done
Read now
Unlock full access