Time keeper bash script

February 2017 ยท 1 minute read

Here’s a simple script to log your time for freelancing or school time tabling, I also grab my connected network as a sort of hacky way to track my location


#nmcli outputs the SSID, I echo that, a comma, and the current time to a file
echo -n $(nmcli -t -f NAME connection show --active)',' >> timerecords.txt
echo -n $(date +%s)',' >> timerecords.txt

#read hangs the terminal until you trigger it to finish

read -p "Press enter to log study times"
echo $(date +%s) >> timerecords.txt