【Oracle&rlwrap】用rlwrap实现Oracle下sqlplus历史命令回调功能

在Linux下使用sqlplus,发现无法像bush一样上下翻页,也不能退格

rlwrap 可以用来支持Oracle下sqlplus历史命令的回调功能,提高效率。

安装rlwrap时,提示需要安装readline

# yum -y install   readline

# wgethttp://dl.fedoraproject.org/pub/epel/7/x86_64/r/rlwrap-0.42-1.el7.x86_64.rpm

#yum -y install rlwrap-0.42-1.el7.x86_64.rpm

################################################

# rlwrap  --help

# su - oracle

# rlwrap  sqlplus / as sysdba

//现在可用rlwrap实现Oracle下sqlplus历史命令回调功能了

编辑/home/oracle/.bash_profile,,添加如下两行:

# vim/home/oracle/.bash_profile

alias sqlplus="rlwrap sqlplus"

alias rman="rlwrap rman"

# source/home/oracle/.bash_profile

参考:

http://blog.csdn.net/bzfys/article/details/19192853

https://github.com/hanslub42/rlwrap

http://man.chinaunix.net/linux/lfs/htmlbook/appendixa/autoconf.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容