I need to run
killall Dock in a script I use regularly, in order for it to work.
Unfortunately all the badges in the Dock disappears when Dock is killed, and don't reappear until they're modified individually by the the application in question. So if the Mail application for example has 123 unread emails as the badge, the badge disappears until I read an email or receive a new one.
How can I restore the badges for all apps at the same time though, in my script?