osx - How to catch softwareupdate output -


i'm trying catch output of softwareupdate command under os x. softwareupdate -l >> somefile catch first few lines (software update tool copyright 2002-2012 apple inc. finding available software), rest missing (no new software available.) need bash script.

current catching code: update=$(softwareupdate -l);

any appreciated.

try redirecting stderr messages well. command substitution captures output sent stdout (fd 1; stderr = fd 2).

update=$(softwareupdate -l 2>&1) 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -