Using High Sierra I have this set as a cronjob to run once a day.
I've been struggling to work out how to get grep to find the string in the output. Am fairly new to bash scripting.
Any advice on where I went wrong, and examples are appreciated!
#!/bin/bash printf '\e[2t' check=$(softwareupdate -l) sleep 5 echo $check if [ fgrep "No new software" <<< $check ] then say "Peter, You are up to date" else say "Peter, you have updates" fi