Skip to content

Instantly share code, notes, and snippets.

@Dobbie03
Created March 3, 2018 07:38
Show Gist options
  • Save Dobbie03/992635d4e6fcee82e184f363926d92c2 to your computer and use it in GitHub Desktop.
Save Dobbie03/992635d4e6fcee82e184f363926d92c2 to your computer and use it in GitHub Desktop.
#!/bin/sh
#Hugo F.
#Count how many update available using checkupdate
#echo "$(checkupdates|wc -l)+$(cower -u|wc -l)"|bc -l
COUNTARCH=$(checkupdates|wc -l)
COUNTAUR=$(cower -u|wc -l)
UPDATES=$(checkupdates | awk '{print $1;}')
TOTAL=$(($COUNTARCH+$COUNTAUR))
if [[ $TOTAL -ge 1 ]]; then
echo $TOTAL
#notify-send -t 60 -u normal "New Arch Linux Updates" "$UPDATES"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment