Stats script

From Cheatsheet
Jump to navigation Jump to search

Alright to use my custom response tracking script do the following.

vim /bin/stats

Paste in the following.


#!/bin/bash
# compiled by mshooltz

PID=$$
curl -s --progress-bar -b "entropy-support-login=mshooltz@liquidweb.com" -u (HD usename here):(hdpassword here) https://hd.int.liquidweb.com/stats/detail.mhtml | lynx -dump -stdin -nolist -width=350 | grep -A500 Responses > /tmp/$PID.stats
grep -A2 Responses /tmp/$PID.stats

## add or remove people in the following Fashion
#
#             grep (HD username) /tmp/$PID.stats
#

echo ""
echo "ME"
       grep (HD username) /tmp/$PID.stats
echo ""
echo ""
echo "Support"
echo ""
echo "1st shift"
        grep rhatt /tmp/$PID.stats
echo ""

echo "2cnd shift"
        grep rdrumheller /tmp/$PID.stats
echo ""

echo "3rd shift"
        grep jhayhoe /tmp/$PID.stats 


rm -f /tmp/$PID.stats


Now you will need to give the file execute perms.

chmod +x /bin/stats

Now all you have to do at the command line for your workstation, is type stats. Also you can add whoever you would like to track, in the file I have left a few examples in the file for you.