---
title: "impala和hive shell下退格键出现 ^H的解决方法"
author: "daizj"
date: "2015-09-16T17:52:32Z"
tags: ["^H", "hive", "shell"]
categories: ["开源软件"]
slug: "impala-hive-shell-h"
draft: false
lastmod: "2015-09-16T17:52:55Z"
id: 2244027
url: "https://daizj.iteye.com/blog/2244027"
---

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

 

\[await]mqq@192.168.10.1:~$ 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] &gt; show^H^H^H^H^H

 

 

 

解决方法如下三种：

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

 

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

 

３、在bash下：把 stty erase ^? 添加到.bash\_profile中

　　在csh下： 把$ stty erase ^H  添加到.bash\_profile中