Skip to content

Instantly share code, notes, and snippets.

@hieunt79
Created July 31, 2020 03:31
Show Gist options
  • Save hieunt79/7d62a4fd25c3dde2263a14329ab9fc02 to your computer and use it in GitHub Desktop.
Save hieunt79/7d62a4fd25c3dde2263a14329ab9fc02 to your computer and use it in GitHub Desktop.
Count rp10m, rph of log file
#!/bin/bash
LOG_FILE=$1
#for hour in 00 01 02 03
#do
# pattern=" $hour"
# rph=`egrep " $hour:" $LOG_FILE | wc -l`
# echo $hour : $rph
#done
for hour in 00 01
do
for min in 0 1 2 3 4 5
do
rp10m=`egrep " $hour:$min" $LOG_FILE | wc -l`
echo $hour:$min : $rp10m
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment