grep searchquery /var/log/lighttpd/access.log | awk '{print $7}' | grep searchquery | sed "s/\/\(.*\)?action.*searchquery=\(.*\)&by.*/\2 -> \1/" test -> ReadingNotes/ProgrammingForPeace test -> ReadingNotes/Walden Thoreau -> ReadingNotes/Walden Thoreau -> ReadingNotes/Walden prioritysystem_discussion_Paola_nov2009.txt -> Cognition/PriorityByEconomicalSystem vademecum.txt -> Content/Vademecum vademecum.txt -> Content/Vademecum