projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b73e69
)
script for sorting apache log files by timestamp.
author
Chris Koeritz
<fred@gruntose.com>
Sat, 1 Oct 2016 04:53:37 +0000
(
00:53
-0400)
committer
Chris Koeritz
<fred@gruntose.com>
Sat, 1 Oct 2016 04:53:37 +0000
(
00:53
-0400)
scripts/web/apache_log_sorter.sh
[new file with mode: 0644]
patch
|
blob
diff --git a/scripts/web/apache_log_sorter.sh
b/scripts/web/apache_log_sorter.sh
new file mode 100644
(file)
index 0000000..
5da498c
--- /dev/null
+++ b/
scripts/web/apache_log_sorter.sh
@@ -0,0
+1,13
@@
+#!/bin/sh
+
+if [ ! -f $1 ]; then
+ echo "Usage: $0 "
+ echo "This script needs a file to sort and a new name for the file after sorting."
+ exit 1
+fi
+
+echo "Sorting $1 into $2"
+
+sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n $1 > $2
+
+