Using awk to get values from XML
I have had occasion to write a shell script which carries out several tasks relating to learning analytics. One such task is to find out the current academic week. It’s not that easy to do MySql/PHP operations from inside a shell script. As luck would have it we have an in house web service which provides this information. The output however, is either JSON or XML. The XML version looks like this: <?xml version=’1.0′ encoding=’iso-8859-1′ ?> <weekno>32</weekno> The Linux shell…