From 4ba0963c02d51d11468becf0aa8020ed66de7361 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Fri, 30 Nov 2007 17:30:52 -0800 Subject: add "show log all" that plays nice with logrotate files --- scripts/vyatta-show-log-all | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/vyatta-show-log-all (limited to 'scripts') 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[@]} -- cgit v1.2.3