This very dirty bash snippet works (currently): #!/bin/sh JSON=$(wget -qO- 'http://downloadcenter.intel.com/JSONDataProvider.aspx?sort=Date&sortDir=descending&Hits=1&keyword="Linux microcode "&lang=eng&refresh=filters&dataType=json') VERSION=$(echo $JSON | sed 's/^.*,"version":"\([^"]*\).*$/\1/') DOWNLOADID=$(echo $JSON |sed 's/^.*,"downloadid":"\([^"]*\).*$/\1/') wget "http://downloadmirror.intel.com/${DOWNLOADID}/eng/microcode-${VERSION}.tgz"
It's obviously incorrect to run sed on serialized data, though. And this example will fail on marginal changes. Better ways of parsing JSON (such as using python) are discussed at http://stackoverflow.com/questions/1955505/parsing-json-with-sed-and-awk -- update-intel-microcode does not find latest available microcode update https://bugs.launchpad.net/bugs/569488 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs