impala和hive shell下退格键出现 ^H的解决方法

通过impala-shell 连接到impala shell命令下是,输入命令要删除字符时会出现 ^H字符,而不能真正删除,如下所示:

 

[await][email protected]:~$ impala-shell

Starting Impala Shell without Kerberos authentication

Connected to slave1:21000

Server version: impalad version cdh5-1.3.0 RELEASE (build 40e1b62cf0b97f666d084d9509bf9639c575068c)

Welcome to the Impala shell. Press TAB twice to see a list of available commands.

 

Copyright (c) 2012 Cloudera, Inc. All rights reserved.

 

(Shell build version: Impala Shell vcdh5-1.3.0 (40e1b62) built on Tue Mar 25 13:46:44 PDT 2014)

[slave1:21000] > show^H^H^H^H^H

 

 

 

解决方法如下三种:

1、通过ctrl+退格键 组合进行删除

 

2、启动impala-shell 和hive shell前执行 stty erase ^H,再通过相应命令连入shell则能正常

 

3、在bash下:把 stty erase ^? 添加到.bash_profile中

  在csh下: 把$ stty erase ^H  添加到.bash_profile中

你可能感兴趣的:(impala,shell,hive,^H,退格)