Bash Scripting
Sample “SOURCE”
#!/bin/bash
source /top/CPshared/5.0/tmp/.CPprofile.sh
timestamp=$(date + "%Y -%m-%d %H:%M:%S")
logfile=`hostname`_pdpsummary.csv
output1=$(pdp monitor summary all | wc -l)
output2=$(pdp monitor summary all | egrep '^[^[:sapce:]]' | wc -l)
combined="$timestamp,`hostname`,$output1,$output2"
echo "$combined" >> $"logfile"
chmod +x
crontab -e
1 * * * * /home/admin/pdpcountlogger.sh