Running this command on the command line works:
But I can't get the output into a variable in my script:
Don't know why the post has a return during iTunes
Code:
/usr/sbin/softwareupdate --list | egrep '! (MacOSXUpdate|Xcode|QuickTime|iTunes)' | awk '{print $2}' | tr '\n' ' '
Code:
search_updates='MacOSXUpdate|Xcode|QuickTime|iTunes' updates=`/usr/sbin/softwareupdate --list | egrep '! ($search_updates)' | awk '{print $2}' | tr '\n' ' '`
Comment