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
Post a Comment