I'm trying to create a workflow for our school in which a computer can be booted, will check for available software updates and apply any necessary, and then check in with our JSS once no more software updates are identified. I'm curious if anyone has a solution for capturing the server response from the softwareupdate command? So far when I run:
#!/bin/bash su=$(softwareupdate -l) echo "$su"
The terminal output is:
No new software available.
Server response and then:
Software Update Tool Finding available software
Output of echo "$su"
With the server response "No new software available." printing first and without regard for the output of the echoed variable. In other words I only ever seem to be able to programmatically capture "Software Update Tool" and "Finding available software". Does anyone have a solution for capturing the server response from the softwareupdate command?
Solved! Go to Solution.