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 -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -