I have several shell scripts (bash) which are started by cron. Every time a script is executed I get an email saying "stdin: is not a tty". Can someone please tell me how to fix this? All scripts run successfully but these mails are killing my email folder.
I use Debian Wheezy. "/root/.bashrc" is empty. Cron entries are like:
/bin/bash --login /root/script.sh > /dev/null
Even this script produces the error message:
#!/bin/bash
ls
Content of .profile:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n
.profileor.bash_profilesince you're telling bash to read it). We can't help you unless you post the script content. If you want to diagnose what it might be, addset -xat the top of the script.sttyandmesgare the typical culprits. You can run them with a2>/dev/nullto quiet them.mesg.