Created
May 6, 2015 02:26
-
-
Save jianingy/859872d85a0aa03f6d65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for access_log in /export/logback/www*/app_m_access.log.2015-04-*.gz; do | |
( | |
csv_file="`mktemp $root/tmp/access_log-XXXXXX.csv`" | |
: > $csv_file | |
echo "processing $access_log -> $csv_file" | |
$root/scripts/parse_access_log_v2.py --source xxxxxxxx --access-log $access_log > $csv_file | |
echo "\COPY m_access_log FROM '$csv_file' WITH CSV" | connect_postgres | |
rm -f $csv_file | |
) & | |
done | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment