Hello, some of the commands that your script uses are very Linux specific which cause it to not work on non Linux systems. The commands:
- md5sum
- date - the options you pass it are GNU date specific
- tac - can be replaced with
awk '{print NR,$0}' | sort -nr | sed 's/^[0-9]* //'
Thanks