timelog (237B)
1 #!/bin/sh 2 3 file=~/documents/documents/timelog.txt 4 notify=termux-toast 5 6 [ $(grep "$2" $file | sort -k 2,3 | cut -d' ' -f1 | tail -n1) = $1 ] && $notify "Fehler" && exit 7 8 echo "$1 $(date +'%Y-%m-%d %H:%M:%S') $2" >> $file && $notify "Log"