I want to add some aliases, variables and < bind > commands into
$HOME/.kshrc file. In interactive shell everythink goes OK, but problem
arises in shell scripts. I put bind command into .kshrc file and when I
started shell script, I got following message:
“cannot bind, not a tty”
OK, special builtin command “set -o” gives me a current settings:
$ set -o
emacs interactive monitor stdin
And here’s a problem: how can I resolve settings from builtin command set?
When I want to handle “set -o” output, I got:
$ set -o | cat
emacs stdin
$ set -o | grep in
emacs stdin
Can anybody help me? Is there other solution? Some environment variable? I
appreciate any answer.
Thanks.
I want to add some aliases, variables and < bind > commands into
$HOME/.kshrc file. In interactive shell everythink goes OK, but problem
arises in shell scripts. I put bind command into .kshrc file and when I
started shell script, I got following message:
“cannot bind, not a tty”
(Well, there are a lot more aliases in the case, but that seems to work
for me – it detects whether or not it is an interactive shell, and only
sets those things, including the bind, for an interactive shell.)
Martin Michalek <> michalek@procaut.sk> > wrote:
I want to add some aliases, variables and < bind > commands into
$HOME/.kshrc file. In interactive shell everythink goes OK, but problem
arises in shell scripts. I put bind command into .kshrc file and when I
started shell script, I got following message:
“cannot bind, not a tty”
(Well, there are a lot more aliases in the case, but that seems to work
for me – it detects whether or not it is an interactive shell, and only
sets those things, including the bind, for an interactive shell.)
Check the documentation of the shell’s ‘set’ command. It’s a little
obscure, but it does mention that ‘-’ is a special parameter that
lists/contains the current shell “option flags”.
PS: I cannot find special parameter “$-” in documentation.
David Gibbs <> dagibbs@qnx.com> > wrote in message
news:9g369v$l5c$> 5@nntp.qnx.com> …
Martin Michalek <> michalek@procaut.sk> > wrote:
I want to add some aliases, variables and < bind > commands into
$HOME/.kshrc file. In interactive shell everythink goes OK, but
problem
arises in shell scripts. I put bind command into .kshrc file and when
I
started shell script, I got following message:
“cannot bind, not a tty”
(Well, there are a lot more aliases in the case, but that seems to work
for me – it detects whether or not it is an interactive shell, and only
sets those things, including the bind, for an interactive shell.)