cron - Strange output of bash script -


i have bash script running on centos 6 cron

sh /a/mem1.sh >/a/mem1.txt; if [ -s /a/mem1.txt ] ; mail -s "server low memory" < /a/mem1.txt server@example.com ; fi 

but under centos 7 works cron - issues strange 3-line additional output

tput: no value $term , no -t specified tput: no value $term , no -t specified tput: no value $term , no -t specified 

so receive 2 emails - 1 normal script output should , email strange outputs above

i checked line-by-line script commands inside - works without errors or warnings. google did not lot. in advance hint , how solve it.

something running tput in script (presumably colorize output when can) , centos 7 has no term value set in cron environment tput complaining it.

either remove calls tput script or set value term process via cron or add -t flag calls force particular term type.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -