diff options
-rwxr-xr-x | scripts/vyatta-show-log-all | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-show-log-all b/scripts/vyatta-show-log-all index ceb439f..126b7fc 100755 --- a/scripts/vyatta-show-log-all +++ b/scripts/vyatta-show-log-all @@ -5,5 +5,5 @@ 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[@]} +[ ${#zipped_files[@]} -gt 0 ] && gunzip --stdout ${zipped_files[@]} +[ ${#plain_files[@]} -gt 0 ] && cat ${plain_files[@]} |