From 1ba101d86b0424dae0c796391e9aadbc8599249b Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Sun, 17 Jul 2011 15:06:36 +0200 Subject: [PATCH] adding more related logs scripts --- shell_scripts/logs_extract_last_month | 3 +++ shell_scripts/logs_monthly_stats | 2 ++ 2 files changed, 5 insertions(+) create mode 100755 shell_scripts/logs_extract_last_month create mode 100755 shell_scripts/logs_monthly_stats diff --git a/shell_scripts/logs_extract_last_month b/shell_scripts/logs_extract_last_month new file mode 100755 index 0000000..e6e513f --- /dev/null +++ b/shell_scripts/logs_extract_last_month @@ -0,0 +1,3 @@ +#! /usr/bin/env bash +MONTH=`date +%m --date "a month ago"` +grep "^$MONTH-" \##pim.log > $MONTH-pim.log diff --git a/shell_scripts/logs_monthly_stats b/shell_scripts/logs_monthly_stats new file mode 100755 index 0000000..c82e8af --- /dev/null +++ b/shell_scripts/logs_monthly_stats @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +wc -l 20{09,10,11}-* | grep -v total | sed "s/ 2010.*//" | sed "s/ 2009.*//" | sed "s/ 2011.*//" > monthly_lines.data