apt-get install - how to get report about failed installs?

view story

http://askubuntu.com – I've created my script to install software on a new computer. Basically it includes lot's of apt get install <pkg name> -y lines. How can I get a short report about installs that has failed? Is there a function like that in bash? (HowTos)