![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Troubleshooting Automatic Software Update in Mac OS X | iBot | OS X Support RSS | 0 | 11-07-2008 09:50 PM |
| Software update, upgrade--what's the difference? | iBot | OS X Support RSS | 0 | 10-21-2008 03:50 PM |
| Script for checking and reporting file sizes in a directory. | marconi | Shell Programming and Scripting | 1 | 04-03-2008 08:00 AM |
| S-107: HP Software Update Running on Windows | iBot | Security Advisories (RSS) | 0 | 01-08-2008 07:10 PM |
| Script for reporting network printers | glefko | Shell Programming and Scripting | 0 | 04-19-2006 10:15 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Software Update reporting script
I need a script that gets the output of softwareupdate -al on each machine (the list of available updates) and reports how many updates are needed in total by all the machines on the network, and the results to 4 different recipients.
i.e. total patches required = 12 hostname1 =4 patch(es) hostname2=3 patch(es) hostname3=4 patch(es) hostname4=1 patch(es) |
|
||||
|
I'm not seeing the -l option in man softwareupdate, but it ran without complaining in my one test (on a machine that needed no updates).
You should be able to grep the lines relating to software updates, then pipe to "wc -l" Store that in a variable, then write the host name and update count to a file, presumable with an easily parsible delimiter (like "=" for instance). Push the file to a central mutually accessible location, then cat the files. From there you can create your report. The important part is determining the unique character/s you want to grep for on the hosts, before writing the host specific reports. It's pretty easy to determine from the "man" output, and running the command on a few machines that actually need updates. |
| Sponsored Links | ||
|
|