File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 11#! /bin/zsh
22
3- source ~ /.zprofile
4-
5- TRAPZERR () {
6- datetime=$( date +%Y-%m-%d\ %H\: %M\: %S)
7- echo " Problem running 'check_pandas_warning.sh'" | /usr/bin/mail -s " FUTP Problem running 'check_pandas_warning.sh'" $PYSYS_EMAIL
8- }
9-
103# Search for pattern and capture results
11- RESULTS=$( grep -rnE ' FutureWarning|DeprecationWarning|ChainedAssignmentError' " $ECHO_PATH " 2> /dev/null)
4+ RESULTS=$( /usr/bin/find " $ECHO_PATH " -type f -name " *.log" -exec /usr/bin/grep -E ' FutureWarning|DeprecationWarning|ChainedAssignmentError' /dev/null {} +)
5+
6+ # echo "RESULTS=[$RESULTS]" >&2
127
138# Exit silently if nothing found
149if [[ -z " $RESULTS " ]]; then
1510 exit 0
1611fi
1712
18- # Compose and send email
19- SUBJECT=" Future/Deprecation Warning instances found"
20- BODY=" $RESULTS "
13+ SUBJECT=" Future/Deprecation/ChainedAssignment Warning instances found"
14+
15+ # echo "$ECHO_PATH=[$ECHO_PATH] SUBJECT=[$SUBJECT] PYSYS_EMAIL=[$PYSYS_EMAIL]" >&2
16+ # echo "HOME=[$HOME] USER=[$USER] LOGNAME=[$LOGNAME]" >&2
2117
22- echo " $BODY " | /usr/bin/mail -s " $SUBJECT " " $PYSYS_EMAIL "
18+ echo " $RESULTS " | /usr/bin/mail -v -s $SUBJECT $PYSYS_EMAIL
19+ # echo "mail exit code: $?" >&2
You can’t perform that action at this time.
0 commit comments