fork download
  1. #!/bin/bash
  2.  
  3. function md()
  4. {
  5. date +'%b %e' --date "$@"
  6. }
  7.  
  8. start=`md 'last week'`
  9. end=`md 'now'`
  10. grep 'OK LOGIN' | sed -n "/$start/,/$end/p"
Success #stdin #stdout 0.02s 5308KB
stdin
Aug 29 OK LOGIN
Aug 30 OK LOGIN
Sat Sep  2 03:32:13 2012 [pid 12461] CONNECT: Client "66.249.68.236"
 Sat Sep  2 03:32:13 2012 [pid 12460] [ftp] OK LOGIN: Client "66.249.68.236", anon     password "gxxglxxxxt@google.com"
 Sat Sep  2 03:32:14 2012 [pid 12462] [ftp] OK DOWNLOAD: Client "66.249.68.236",   "/pub/10.5524/100001_101000/100022/readme.txt", 451 bytes, 1.39Kbyte/sec
 Sat Sep  2 03:32:22 2012 [pid 12677] CONNECT: Client "66.249.68.236"
 Sat Sep  2 03:32:23 2012 [pid 12676] [ftp] OK LOGIN: Client "66.249.68.236", anon password "xxxxxbot@google.com"
Sep  6 OK LOGIN
Sep  7 OK LOGIN
stdout
Aug 30 OK LOGIN
 Sat Sep  2 03:32:13 2012 [pid 12460] [ftp] OK LOGIN: Client "66.249.68.236", anon     password "gxxglxxxxt@google.com"
 Sat Sep  2 03:32:23 2012 [pid 12676] [ftp] OK LOGIN: Client "66.249.68.236", anon password "xxxxxbot@google.com"
Sep  6 OK LOGIN