The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > OS X (Apple)
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-09-2009
glev2005 glev2005 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 74
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)
  #2 (permalink)  
Old 04-11-2009
[MA]Flying_Meat [MA]Flying_Meat is offline
Registered User
  
 

Join Date: Sep 2002
Location: San Fran
Posts: 130
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0