Hi All,
I need to pull the data from a file from 2 set of directories & should be mailed.
I have a code , it is failing for some reason. Do somebody correct me where my script is going wrong.
Directories:
1st Set of Directory /176_PS/Transactions/**/syslog.log
** : prd1
prd2
prd3
2nd Set of Directory /176_TS/Transactions/**/syslog.log
** : tst1
tst2
tst3
#!/bin/bash
#Script to Pull the Missing Elements of 176s
while [ true ]
do
hour=`date +%H`
minute=`date +%M`
seconds=`date +%S`
if [ "$minute" == "41" ] && [ "$second" == "00" ]
then
cd /
grep "missing document " /176S_*/Transactions/**/system.log | cut -d\/ -f4 | sort| uniq -c | mail -x myself@dot.com
fi
sleep 1
done