diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-11-30 17:30:52 -0800 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-11-30 17:30:52 -0800 |
commit | 4ba0963c02d51d11468becf0aa8020ed66de7361 (patch) | |
tree | 48f84bbf9c5ffe4d86487d042cc0c60045f9ea2c /scripts | |
parent | efd754838635fa7153ce2ee7f52c1e6a6fc297fa (diff) | |
download | vyatta-op-4ba0963c02d51d11468becf0aa8020ed66de7361.tar.gz vyatta-op-4ba0963c02d51d11468becf0aa8020ed66de7361.zip |
add "show log all" that plays nice with logrotate files
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-log-all | 9 |
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[@]} |