stty errors in cron, is this a sound idea to get around it? - SSH

This is a discussion on stty errors in cron, is this a sound idea to get around it? - SSH ; Hi all, I have some users with .profiles that are full of stty commands for a third party piece of software that they use. They also have cron jobs that run and, not surprisingly, these stty commands bomb out in ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: stty errors in cron, is this a sound idea to get around it?

  1. stty errors in cron, is this a sound idea to get around it?

    Hi all,

    I have some users with .profiles that are full of stty commands for a
    third party piece of software that they use. They also have cron jobs
    that run and, not surprisingly, these stty commands bomb out in cron
    since cron has no controlling terminal. I have done some reading on
    this and it appears to me that .profile is not the best place to put
    stty commands, for this very reason. Would it be a sound idea to put
    the stty commands in a .bashrc | .kshrc instead of .profile, and have
    the *rc file call .profile instead?

    This looks good on paper, just wanted to check with you folks to see if
    it's a good idea or not.


  2. Re: stty errors in cron, is this a sound idea to get around it?

    Oops, I put this in the wring group.

    1000 pardons.


  3. Re: stty errors in cron, is this a sound idea to get around it?

    Oops, I put this in the wrong group.

    1000 pardons.


  4. Re: stty errors in cron, is this a sound idea to get around it?

    On 7 Mar 2006 07:12:47 -0800, tonij67@hotmail.com wrote:
    > Hi all,
    >
    > I have some users with .profiles that are full of stty commands for a
    > third party piece of software that they use. They also have cron jobs
    > that run and, not surprisingly, these stty commands bomb out in cron
    > since cron has no controlling terminal. I have done some reading on
    > this and it appears to me that .profile is not the best place to put
    > stty commands, for this very reason. Would it be a sound idea to put
    > the stty commands in a .bashrc | .kshrc instead of .profile, and have
    > the *rc file call .profile instead?


    I wouldn't if me.

    Just wrap any stty commands in a tty test.

    Something like

    tty -s
    if [ $? -eq 0 ] ; then

    (stty stuff here)

    fi

+ Reply to Thread