#!/bin/sh while true; do contents=`tail -10 main.log >&1 | sed "s/Testing/ Testing/" | sed "s/Step/ Step:/" | cut -b28-100 | sed "s/info/| [WORKER-1]/" | sed "s/debug/ /" | egrep -a -w 'Step|Testing proxy' | uniq | sed "s/Testing proxy/Testing Proxy/" | sed "s/CREATION/ CREATION/" | sed "s/VALIDATION/ VALIDATION/" | sed "s/ACTIVATION/ ACTIVATION/" | sed "s/http/ HTTP/" | sed "s/Step/STEP/" | sed "s/Testing/TESTING/" | sed "s/Proxy/PROXY/" | sort -u` tail -10 main.log >&1 | egrep -w 'Testing|IP|socket|400|ECONNREFUSED|ECONNRESET|ENETUNREACH|503|Unexpected|successfully!' | cut -b28-100 >> ewow.log tail -2 ewow.log | egrep -w 'Testing' | sort -u | cut -b40-100 >> ewow2.log tail -2 ewow.log | egrep -w 'IP|socket|400|ECONNREFUSED|ECONNRESET|ENETUNREACH|503|Unexpected|successfully!' | sort -u >> ewow2.log compare=`tail -10 main.log >&1 | sed "s/Testing/ Testing/" | sed "s/Step/ Step:/" | cut -b28-100 | sed "s/info/| [WORKER-1]/" | sed "s/debug/ /" | egrep -a -w 'Step|Testing proxy' | uniq | sed "s/Testing proxy/Testing Proxy/" | sed "s/CREATION/ CREATION/" | sed "s/VALIDATION/ VALIDATION/" | sed "s/ACTIVATION/ ACTIVATION/" | sed "s/http/ HTTP/" | sed "s/Step/STEP/" | sed "s/Testing/TESTING/" | sed "s/Proxy/PROXY/" | sort -u` if [ "$contents" != "$compare" ]; then echo no >> /dev/null else echo $contents &> console.log fi done