summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-show-log-all9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/vyatta-show-log-all b/scripts/vyatta-show-log-all
new file mode 100755
index 0000000..ceb439f
--- /dev/null
+++ b/scripts/vyatta-show-log-all
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+shopt -s extglob nullglob
+
+declare -a zipped_files=($( printf "%s\n" /var/log/messages*.gz | sort -r ))
+declare -a plain_files=($( printf "%s\n" /var/log/messages!(*.gz) | sort -r ))
+
+gunzip --stdout ${zipped_files[@]}
+cat ${plain_files[@]}