stty: : No such device or address

I encoutered the error "stty: : No such device or address" in the korn shell script log. I added STTY EARSE ^H in profile. why iam i getting that error in Korn shell

Thanks
nandinisagar

Hi Nandini,
dont mind, but is that EARSE a typo in this thread, or that is what you really typed in the script. shouldn't it be erase :slight_smile:

Its a typo

In the profile we have the following line

stty erase ^H

Thanks
nandinisagar

This occurs on non interactive shells. Read this thread.

I read that posting , i don't know what to add in .profile as I am new to scripting... Can you please tell me what to add in .profile in order to avoid that message.

Thanks
nandinisagar

Is it possible for you to post your current .profile file here ??

That particular post is pretty clear on what you need to do but here is a starting point.

You will want to look for instances where you are executing commands like this in your .profile or .kshrc:

stty -o vi or stty erase ^H

and add a test like this:

if [[ $- = *i* ]]
then
    stty -o vi
    stty erase ^H
fi

If you're new to scripting and you still struggle with this example then you're going to need to post your .profile and .kshrc as mahendramahendr requested for further help.