View Single Post
  #25  
Old 02-20-2012, 01:51 PM
phobus phobus is offline
Fire Giant


Join Date: May 2011
Posts: 609
Default

Hey, so I tried running this under OS X and got some errors because the BSD version of stat(1) doesn't support --printf. Also, my log dir includes a space which was screwing with the for loop so I hacked the IFS variable. This works for me, and probably will under Linux too:

Code:
#!/bin/bash

# Define your log directory here - easiest to symlink to your wine DIR
LOGDIR="/Applications/Project\ 1999.app/drive_c/eq/Logs"

# Don't mess with this!
IFS=$'\n'

while :; do
        for f in `find ${LOGDIR}/eqlog* -newerct "1 minute ago"`; do
                echo "Working with: $f"
                curl -F "dump=$(tail -n 100 $f | grep auctions)" http://ahungry.com/aucDump.php
        done
        sleep 60
done
Last edited by phobus; 02-20-2012 at 05:04 PM..
Reply With Quote