From the following output, I need to pull out the field to the left of the "1" - e.g. 'hostnameb'. Is there a simple awk statement or similar that I can use to do this?
AnSG SystemList global hostnamea 2 hostnameb 1
The field will not necessarily be second from the end - but always the first field to the left of the "1". Shortest way gets the points.