Quite often when working with internet data, you will find yourself wanting to figure out what sort of device users are using to access your content. Luckily, if you’re using HTTP, there is a standard for that: The user-agent header.
Since I’m in exactly that position, I’ve added a new script to my Dotfiles that reads user agents on stdin
, parses them, and writes them back out in a given format.