diff bin/statfun @ 124:5bafb912837e

Massive addition of old scripts collection.
author Edho Prima Arief <edho@myconan.net>
date Wed, 26 Oct 2011 15:22:00 +0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/statfun	Wed Oct 26 15:22:00 2011 +0700
@@ -0,0 +1,8 @@
+#!/bin/sh
+> /tmp/mainlogfun
+while read line; do
+	filename=$(printf "%s" "${line}" | grep OK\ DOWNLOAD | grep -v "^$" | sed -e 's/.*OK DOWNLOAD: Client "[^"]*", "\(.*\)"..*/\1/')
+	basename -- "${filename}" >> /tmp/mainlogfun
+done < /srv/log/vsftpd/main.log
+grep -v "^$" /tmp/mainlogfun > /root/mainlogfun
+