Press "Enter" to skip to content

Month: September 2013

Extract referers from Apache logs

This quick awk one-liner (tested on Linux) will extract all referer (referrer) entries from a combined Apache log file (called LOGFILE) excluding entries such as “”, “-“, (empty) and ones containing DOMAIN. Useful if you want to check where external referers are coming from
awk '($11 !~ /^"?-?"?$/ && $11 !~ /DOMAIN/) {print $11}' LOGFILE

What I’d like from a Sat-Nav system

Just a few bullet points about some features which would encourage me to buy a new Sat Nav:

Able to set route via computer
I can tweak a route via Google Maps to avoid areas I don’t like for whatever reason, or to “swing by” places – I’d love to be able to just then click “Send to Satnav” and for it to be picked up
Traffic planning
Will it be quicker for me to go via the A50 or the M1 tomorrow morning and what time should I leave to be at my destination for 8.50am? Surely Satnavs can get traffic reports, trend them over time, and then suggest the best route for the time of day (and flag if the traffic flow is already appearing different today as opposed to yesterday/last week)
Alternative transportation options
Could it even be faster for me to not drive to my destination, but to drive to one of Leicester’s Park and Ride facilities and then catch the bus in from there? How about drive to Loughborough train station and then catch the train in? If I could set a “Petrol costs XX much, a day parking costs XX, trains from YY costs XX, park and rides cost XX: which would be the cheapest/quickest/most reliable routes?”