Skip to content

Instantly share code, notes, and snippets.

@soundsnw
Created October 14, 2022 17:52
Show Gist options
  • Save soundsnw/f0d997dc696ba09a3f26192a017eff49 to your computer and use it in GitHub Desktop.
Save soundsnw/f0d997dc696ba09a3f26192a017eff49 to your computer and use it in GitHub Desktop.
#!/bin/zsh
export PATH=/usr/bin:/bin:/usr/sbin:sbin
recommendedUpdates=$(defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist RecommendedUpdates | wc -l | awk '{print $1}')
if [[ recommendedUpdates -gt 2 ]]; then
echo "<result>True</result>"
else
echo "<result>False</result>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment