2013年1月18日金曜日

stty: standard input: Invalid argument

Back Ground

I got error "stty: standard input: Invalid argument" when I ssh to remote server.
It annoyed me for cron batch procedure that send mail STDERR of the batch.

Investigation

I wrote the command bellow for my favor.
stty werase undef
bind '"\C-w": backward-kill-word'
and the stty command was bad. if you put the snipet above, you can avoid get the error for first ssh login, but you will not enable the snipet when you start "screen".

Solusion

# enable only when login via interctive shell
if [ -n "$PS1" ] ; then
  stty werase undef
  bind '"\C-w": backward-kill-word'
fi
happy coding! :)

0 件のコメント: