#!/usr/app/TurboShell/bin/bash
# | gives the output of one command to the next one
echo "lines with ERROR: $(grep -c ERROR nas.log)"
echo "levels:"
cut -d ' ' -f 3 nas.log | sort | uniq -c | sort -rn
echo "days: $(cut -d ' ' -f 1 nas.log | sort -u | wc -l)"
newest=$(tail -n 1 nas.log)
echo "newest: ${newest#* }"
