Mercurial > ec-dotfiles
diff bin/statfun @ 129:f18a27a0e8fc
Merge branch.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sat, 29 Oct 2011 11:40:35 +0700 |
parents | 5bafb912837e |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/statfun Sat Oct 29 11:40:35 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 +