X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsystem%2Fapache_log_sorter.sh;fp=scripts%2Fsystem%2Fapache_log_sorter.sh;h=5da498c39e833ab87e0094d825bb9d788f2e7e8f;hb=a5bb115313d0e3fc896b0b5a6746f3900ab999fb;hp=0000000000000000000000000000000000000000;hpb=221dfeaf97ade253b3522f6b8405519a527fff77;p=feisty_meow.git diff --git a/scripts/system/apache_log_sorter.sh b/scripts/system/apache_log_sorter.sh new file mode 100644 index 00000000..5da498c3 --- /dev/null +++ b/scripts/system/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 + +