I'm trying to return a sorted list of requests per OS type, parsed from an Apache access_log file (not combined format as I need the user-agent info). Here's an example of the output I'm looking for:
250 Windows NT 6.1; WOW64
200 X11; Linux x86_64
I've been able to find a partial solution, thanks to this post. Here's what I've got so far:
awk -F'"' '/GET/ {print $6}' access_log.3 | cut -d' ' -f2 | sort | uniq -c | sort -rn
Is it possible to use cut to get the strings I need, or is another method needed?